PDA

View Full Version : Vlan help.


Dougan
09-23-04, 11:17 PM
Hey guys,
I just got a job as network technician for my local cable company. Now even though the name may imply something it really doesnt. I am entry level, knowing not a whole lot, and they know this, but they have given me a task, and even though they dont think I can do it, id really like to impress them. As we speak I am studying the osi and such forth. Anyways if someone can help with this, that would be awesome.

Ok here goes

2 laptops a cisco 3750 switch, 2 vlans. vlan 10 and vlan 20.

Here is what they want, cidr /24
1. Specify IP addresses
2. Login to switch, show and tab
3. Configure passwords (they told me they want to come to me in order to get into this switch).
4. Specify Vlan Groups.
5. Create Vlan Interfaces.

If anyone can help me to solve this or part of this that would be great, or point me to a place to learn. Thanks a ton guys!

engjohn
09-24-04, 12:48 AM
http://computer.howstuffworks.com/lan-switch16.htm

look here...

Dougan
09-24-04, 08:36 AM
I looked there, but no real concrete stuff.

su root
09-24-04, 09:12 AM
2 laptops a cisco 3750 switch, 2 vlans. vlan 10 and vlan 20.

Here is what they want, cidr /24
1. Specify IP addresses
If you don't know CIDR, you'll want to look it up, it is the basis that all IPs are used by nowadays.. http://public.pacbell.net/dedicated/cidr.html is a good place to start.
/24's are class C's, as long as the address is within the class C range of 192.x.x.x-223.x.x.x and the mask is 255.255.255.0 you are fine. You set the IP address on a "VLan Interface", not an actual port. using the "ip address" command in the interface config mode ("int vlan1")
2. Login to switch, show and tab
Logging in is easy, play around with it and you'll understand the show command, and tab completion. If you are ever stuck, type ? ...even if you are half way through a command, it'll tell you what goes next.
3. Configure passwords (they told me they want to come to me in order to get into this switch).
look into the commands "enable secret", "enable password" and "username" in general conf, and in line configuration mode ("line vty 0 4" for telnet, and "line con 0" for the console), the command "password"... there's 3 types of passwords on a switch, passwords to log in (in line conf), enable passwords for superuser activities (enable), and users, which replace the login passwords with usernames and passwords (username).
4. Specify Vlan Groups.
to get into the vlan section, from global exec, type "vlan database", then you can use the commands to manipulate the vlans.
5. Create Vlan Interfaces.
Same spot as #4, look into the "vlan" command

Besides that, engjohn's link explains vlans well, and this one will give you the command reference you need.
http://www.cisco.com/en/US/products/hw/switches/ps5023/products_configuration_guide_book09186a00802109ee. html

Best thing to do is log in and poke around.. you can't break anything with the "show" command, and the question mark. You can look up the rest of the commands as you find them. Learning the Cisco IOS is not a "quick, show me how" operation.. you need to sit down and play with it... my comments above may sound cryptic, but they are where you should start looking. Good Luck

Dougan
09-24-04, 10:35 AM
Thank you much! Like I was saying, they dont actually think I can do this yet, but they are challenging me a bit to do some research and so forth. I appreciate the help immensly. As far as logging into the router, is it similar to logging into say a linksys router? Using http? Or not really? Thanks

su root
09-24-04, 11:22 AM
No, to log into a router or a switch, you will require a console cable. A console cable is wired differently, it's a "rollover cable" (pin1 connected to pin 8, pin 2 connected to pin7, etc.).. you connect that to the console port on the router, and through a DB9 converter into a serial port on your computer. They should give you a cable and DB9 for this. It's generally a light blue or black, flat cable with an RJ45 on the end. The new ones come with the DB9 embedded, so on one end you have an RJ45, and on the other you have a DB9.

You use hyperterminal with the settings 9600 baud, 8 bits, No parity, 1 stop bit, no flow control on the COM port you plug the cable into. Then you start it up, hit enter, and it should give you a prompt.

http://www.cisco.com/en/US/products/hw/switches/ps700/products_tech_note09186a008010ff7a.shtml#connectte rmtocat

Sound tough yet? It does have a http server (but it sucks), a telnet service, and an ssh service, but they all need to be configured from the console first ;)

Dougan
09-26-04, 07:08 PM
Im reading and not really understanding the cidr. My company wants me to make a block of ips /24. As far as I can read /24 refers to a class c ip? so if I wanted 192.168.0.0-192.168.0.255? with a subnet of 255.255.255.254? Im so confused on this part. which part of the address signifies /24 or what does /24 mean in lamens terms. I only need 3 ips, but they want me to set up a whole block of addresses In the /24 class c. Maybe this is what is confusing me the cidr, because I dont see a 192.169.0.0/24 address. Or am I looking at it wrong?

SevenSixTwo
09-26-04, 07:31 PM
when you see /24
the means take 32 of anything, 1's, 0's, x's.....

00000000 00000000 00000000 00000000
now change 24 of them from the left....

11111111 11111111 11111111 00000000
convert the above string do decimal...

255 255 255 0
that’s you subnet mask

11111111 11111111 11111111 00000000
the 0's are what you can use on the subnet

00000000 you can make any one of them 0's a 1 and convert then to decimal
then that is the number you assign to the host (can't be all 1's or 0's in this case)

10000000 = .128
10000001 = .129

get it?

Dougan
09-26-04, 08:30 PM
Well I think I got it, so basically the /24 is for the number of bits in the octet? In other words if it was /8 it would look like 11111111.00000000.00000000.00000000. So I think I understand that, and the subnet for /8 would be 255.000.000.000? If so then a sub of 255.255.255.0 would give how many ips? Or should I say how many addresses does this block have in it? So would 192.168.0.0 - 192.168.0.254 be the block I need? Thanks again.

su root
09-26-04, 08:38 PM
CIDR is a fairly large topic. It's easier to learn subnetting first:
http://www.learntosubnet.com/

CIDR, to me, is very simple in my mind, but it's difficult to teach. For someone new to CIDR, think of it as subnetting subnets. CIDR allows you to take one of the subnets you made, and re-subnet it into smaller sections. I was taught subnetting first, then CIDR, and now I just use CIDR to carve address space I need, unless I need cookie cutter subnets.

For what you are proposing, you are using a /24, it's just a class C. I don't actually count that as a CIDR range, as CIDR stands for "Classless InterDomain Routing".. "Class C" is Classful.

Had they told you that you were using a /20, then that would be using CIDR (because it's not a class A, B or C), and that would simply be 20 bits of network address, and the remainder (12) bits of host address. (11111111 11111111 11110000 00000000 / 255.255.240.0, example IP range 73.46.16.0-73.46.31.255)

Dougan
09-26-04, 08:46 PM
Wow this is getting confusing, I must have opened a can of worms here hehe. Ok so subnetting will tell me how you got 73.46.16.0-73.46.31.255 as your ip range? Because i think i am understanding how you used cidr to get your subnet of 255.255.240.0, but the ip range through me for a loop. Im going to go read that page and see if it helps much.

su root
09-26-04, 08:47 PM
Well I think I got it, so basically the /24 is for the number of bits in the octet? In other words if it was /8 it would look like 11111111.00000000.00000000.00000000. So I think I understand that, and the subnet for /8 would be 255.000.000.000? If so then a sub of 255.255.255.0 would give how many ips? Or should I say how many addresses does this block have in it? So would 192.168.0.0 - 192.168.0.254 be the block I need? Thanks again.
You've got the idea..
To solve the "If so then a sub of 255.255.255.0 would give how many ips?" question, just use binary math:
255.255.255.0 = 11111111 11111111 11111111 00000000
1's are Network address, 0's are host space.
so what's the largest that 00000000 can be, if it were all turned to 1's?
The bits are counted from the right, the rightmost bit is worth 1, the 2nd bit is worth 2, then 4, then 8, 16, 32, 64, 128, etc.
so, if they were all 1's, then you would get:
128+64+32+16+8+4+2+1 = 255 hosts in that subnet.

Now, you cannot use the very last address (the .255) because it's a broadcast address, and you shouldn't use the first (the .0 ... old networking equipment hates it), so you really have 254 hosts that you can put in there.

su root
09-26-04, 08:53 PM
I'll go into more detail:
255.255.240.0 = 11111111 11111111 11110000 00000000 = /20, they're all the same thing

The example IP range 73.46.16.0-73.46.31.255 works like this:
Using the subnet above, this is what the IP address looks like in binary:
1001001.00101110.0001 = the 73.46.16.0 network
1111111.11111111.11110000.00000000 = subnet 255.255.240.0

From that if you line up the 1's in the subnet, you can see that the 16 bit is on, so this is the first subnet (this is the hardest part to understand... the network part starts at that bit, so the next network would start at .32.0). To get the lowest value, make all the host bits 0's:
1001001.00101110.00010000.00000000 = 73.46.?.?
1111111.11111111.11110000.00000000 = subnet 255.255.240.0

So, the lowest value is 73.46.16.0. We find the highest value by turning all the host bits to 1's:

1001001.00101110.00011111.11111111 = 73.46.?.?
1111111.11111111.11110000.00000000 = subnet 255.255.240.0

If you add it all up, you will get 73.46.31.255

Hope this makes sense

Dougan
09-26-04, 09:22 PM
Well im listening to that great subnet tutorial thank you a ton. I guess my question is, hrm or maybe im just not understanding, but in your ip 73.46.?.? where did the 73.46 come from? Or is that a number that is made up? If so can I just make up a number like say 123.456.?.?. are these just numbers we pick out of the air? 73.46 is network id and the ? marks are numbers we can choose for the host id?

Dougan
09-26-04, 09:34 PM
ahh wait a minute i think i get it. Your cidr of /20 gives you an address of 20 binary numbers 1001001.00101110.0001 thus the ip address. So a /24 is going to give you the extra 4 digits in the last octet? unlike the 20 which gives you 4 less digits in the last octet?

su root
09-26-04, 09:37 PM
On the Internet, there is a body called IANA, www.iana.org who is the Internet Assigned Numbers Authority. They sell IP address blocks to ARIN, www.arin.net the American Registry for Internet Numbers, and others, like RIPE, who sell the IP blocks here. (Requires lots of paperwork and money to lease your own IP block)

For private use, the IP ranges:
10.0.0.0 - 10.255.255.255.. class A, or subnetted as you please
172.16.0.0 - 172.31.255.255.. class B, or subnetted as you please
192.168.0.0 - 192.168.255.255.. 255 x Class C's, or subnetted as you please

Those addresses are not assigned on the internet, and used for home networks, and testing purposes.

For the example, I just made it up, IIRC, the 73.0.0.0/8 block is unassigned right now. When it is assigned, ARIN, or another registrar, will buy it from IANA, and will lease CIDR blocks of it to companies. Most businesses will probably get a /27 or so, depending on their needs, which gives you 5 bits that you are allowed to assign hosts in, equalling 14 hosts. Full Class A's are rarely given out anymore (there's 128 of them, minus 127.0.0.0/8 is loopback, and 10.0.0.0/8 is private, 0.0.0.0 is special = 125 of them, each holding 16million hosts.. no single company can use the full range yet), same with B's (65 thousand hosts each), and even C's (254 hosts each) are hard to get.

Dougan
09-26-04, 09:39 PM
Ok learning more now, your address is a class a address correct?

SniperXX
09-26-04, 09:44 PM
Man I remember doing all this for my CISCO cert. Lol. I'll leave it to you tho Su Root because you seem to even still know more than me network wise with your cert. :D

Oh and Dougan you may want to look into a CISCO certification if you will be using alot of CISCO equip. It will really help you and teach you lots of handy networking info. I took it and think its a great thing to have taken and earned. :) Plus it looks good on resumes in my opinion.

su root
09-26-04, 09:44 PM
Ok learning more now, your address is a class a address correct?
Yes, Class A addresses have the first bit (the 128 bit) as 0.
Class A = 0xxxxxxx
Class B = 10xxxxxx
Class C = 110xxxxx
Class D = 1110xxxx
Class E = 11110xxx

Class D & E are unused on the internet.

The address I used was originally a class A, but it has been subnetted down to a /20, so someone has already borrowed 12 bits.. it's the first useable subnet (as the .0 subnet is usually thrown away)

Dougan
09-26-04, 09:45 PM
You are awesome! I am starting to understand more clearly. So lets say in my network at work they want a block of addresses with a /24. So would 192.168.0.1 - 192.168.0.254 be a valid block of ips? Of course taking into account the address 192.168.0.0 and 192.168.0.255 being the ips used for broadcasts and such. So I have 253 addresses in this class c block.

Dougan
09-26-04, 09:49 PM
or even 200.200.0.0-200.200.0.254, if im understanding correctly.

su root
09-26-04, 09:50 PM
Yes, that would be a valid range for a /24. It would have 254 hosts (255 + the "0" address = 256 addresses in the network.. take away the broadcast and network address, and you get 254.. I made a tiny error above, fixed now ;))

It's important to note that a computer in that range 192.168.0.0/24 will not be able to communicate with computer 192.168.1.45, or any computers outside of the 192.168.0.0/24 range without a router. Same with the 200.200.0.0 range, as long as it's /24.. if it had a mask of /30, then things would be different.

Dougan
09-26-04, 09:51 PM
Yes I am going to learn and get a cisco cert, I just feel sometimes it is easier to learn some of this stuff from real people instead of a book somewhere. People make more sense thand books. Also in my ip above those are class c ips on a private network correct?

su root
09-26-04, 09:54 PM
Yes I am going to learn and get a cisco cert, I just feel sometimes it is easier to learn some of this stuff from real people instead of a book somewhere. People make more sense thand books. Also in my ip above those are class c ips on a private network correct?
The 200.200.0.0/24 range is class C (class C goes from 192-223), but it's not a private network, the private network in the class C area is 192.168.0.0 - 192.168.255.255, which is actually 256 private class C networks.

SniperXX: I don't remember ever telling anyone on here I got any cisco certs. It can't be *that* obvious.. ;)

For subnetting, it's just practice. When I was taught subnetting, they taught me some arcane way of doing it 2^x-2 kind of thing... that didn't work for me.. I found my own way of doing it. Later, when I learned CIDR, they used practically the same method I was using already, which made it very easy for me, and with CIDR I can pump out 1st useable subnets off the top of my head.. for me, I have trouble converting the CIDR notation (/20) into subnet masks.. but there's only so many, and that's just memorization..
/24 = 0
/25 = 128
/26 = 192
/27 = 224
/28 = 240
/29 = 248
/30 = 252

Dougan
09-26-04, 10:00 PM
So if I wanted a private class c network it would have to be 192.168.255.0-192.168.255.255? minus 2 of course. That is what im setting up in the lab for this equipment. Also the rest of the questions they are asking from my original post are just logging into the switch and configuring?

su root
09-26-04, 10:04 PM
Yeah, that range will work, so will any 192.168.x.0/24 range, where x is between 0 and 255 will work just the same. x can be 0 and can be 255 because it is not a subnet, it's a network.

Yeah, the rest of it is just playing around in the switch.

Dougan
09-26-04, 10:12 PM
You are awesome thanks a ton! I will keep you updated as to how well this goes.