Configuring 1 Router with 2 Switches?

So i have 2 switches and I want them to be able to communicate using just the Router inbetween. Switch 3550 is pluged int e0/0 on the Router and Switch2900 is plugged into e0/1 on the Router. (this is just my physical lab)

i've done the following
switch3550#config t
switch3550#(config)ip default-gateway 10.10.11.2 255.255.255.0
switch3550#(config)exit
switch3550#copy run start
building configuration....

(then i pull the console plug and plug it into the switch2900)

switch2900#config t
switch2900#(config)ip default-gateway 10.10.12.2 255.255.255.0
switch2900#(config)exit
switch2900#copy run start
building configuration....


I have switch3550 set to default gateway of 10.10.11.2 255.255.255.0
I have it's ip address set as 10.10.11.3 255.255.255.0
and i do the "no shutdown" and Ctrl Z an Copy run start

I also have switch2900 set to default gateway of 10.10.12.2 255.255.255.0
I have it's ip address set as 10.10.12.3 255.255.255.0
and i do the "no shutdown" and Ctrl Z an Copy run start

now when i plug into the console for the Router...
Router#Config t
Router#(config)int e0/0
Router#(config)ip address 10.10.11.1 255.255.255.0
Router#(config)no shut
Router#(config)exit
Router#copy run start
building configuration.....

Router#Config t
Router#(config)int e0/1
Router#(config)ip address 10.10.12.1 255.255.255.0
Router#(config)no shut
Router#(config)exit
Router#copy run start
building configuration.....

Then i should be able to route and telnet and ping between each of these 3 devices..
Does this look correct? Please lemme know ... Thank you!

Comments

  • shednikshednik Member Posts: 2,005
    No you will need to change the ip default-gateway to the actual interface IP address of the router and have the vlans correctly defined, also both switches will need the vlans and ports assigned correctly.
  • DerekAustin26DerekAustin26 Member Posts: 275
    Could you please show me an example of how the configuration should look ?
  • /usr/usr Member Posts: 1,768 ■■■□□□□□□□
    I don't mean to be rude, but maybe you should brush up on basic network concepts before trying to configure equipment.

    That's a pretty basic config with a glaring error that shednik already pointed out.

    Your default gateways on your switches are wrong, which is a pretty basic concept...
  • DerekAustin26DerekAustin26 Member Posts: 275
    If they are wrong...then to correct them i should have a .1 on the end of my default gateways.. I believe that is the correct way to resolve that problem. Correct me if im wrong.
  • EdTheLadEdTheLad Member Posts: 2,111 ■■■■□□□□□□
    If they are wrong...then to correct them i should have a .1 on the end of my default gateways.. I believe that is the correct way to resolve that problem. Correct me if im wrong.

    Whats a default-gateway for?
    Networking, sometimes i love it, mostly i hate it.Its all about the $$$$
  • shednikshednik Member Posts: 2,005
    Sorry about my previous response not being very clear and while I do agree with /usr if you don't understand why the config was wrong some more reading may be good for you....

    Since you are only using switches with Layer 2 functionality you will need to set up the router to do the routing which looks good. What you need to change are the default gateways on the switches.

    If I understand correctly this is the setup
    3550 fax/x ------- e0/0 Router e0/1 -------- fax/x 2950
    

    So on the interfaces are the router are as follows

    E0/0 - 10.10.11.1/24
    E0/1 - 10.10.12.1/24

    On the 3550 since you are using it as a L2 device only we will need to set a L3 interface like you did to 10.10.11.3 and likewise on the 2950.

    Next the ip default-gateway this is where you made your error. Since there is only one L3 instance on the switch you will need to specify where to send traffic that it is not able to complete an ARP request for. So it will need to be the ip of the routers IP connected to the switch. Say you had a client connected to the 3550 and it wanted to ping the L3 interface on the 2950 - 10.10.12.3. Your PC will send out an ARP request asking who has "10.10.12.3" and it will reach the router's e0/0 where it will reply with I have it(proxy arp). The router will forward the packet on to the 10.10.12.0/24 network where it will reach the intended destination. SO next time the ping should respond faster being that the arp-cache will still hold the MAC of the default gateway for that IP.


    Hope this helps...

    http://en.wikipedia.org/wiki/Address_Resolution_Protocol
    http://en.wikipedia.org/wiki/Proxy_ARP
  • EdTheLadEdTheLad Member Posts: 2,111 ■■■■□□□□□□
    shednik wrote:
    3550 fax/x ------- e0/0 Router e0/1 -------- fax/x 2950
    
    Say you had a client connected to the 3550 and it wanted to ping the L3 interface on the 2950 - 10.10.12.3. Your PC will send out an ARP request asking who has "10.10.12.3" and it will reach the router's e0/0 where it will reply with I have it(proxy arp). The router will forward the packet on to the 10.10.12.0/24 network where it will reach the intended destination. SO next time the ping should respond faster being that the arp-cache will still hold the MAC of the default gateway for that IP.

    That's not correct,You're PC would see the remote network 10.10.12.3 is on a different subnet so it would use the configured default gateway, the local arp cache would be checked to see if the destination mac address is known, if not, an arp request is sent with the destination ip address of the default gateway.The switch will receive the arp request and flood it out all interfaces in the local vlan.The router will receive the arp request, see the destination ip addresses matches his interface and will reply with an arp reply.You're host PC will receive the arp reply and update its arp cache.
    At no point here was proxy arp used.
    Networking, sometimes i love it, mostly i hate it.Its all about the $$$$
  • shednikshednik Member Posts: 2,005
    EdTheLad wrote:
    That's not correct,You're PC would see the remote network 10.10.12.3 is on a different subnet so it would use the configured default gateway, the local arp cache would be checked to see if the destination mac address is known, if not, an arp request is sent with the destination ip address of the default gateway.The switch will receive the arp request and flood it out all interfaces in the local vlan.The router will receive the arp request, see the destination ip addresses matches his interface and will reply with an arp reply.You're host PC will receive the arp reply and update its arp cache.
    At no point here was proxy arp used.

    That make sense now I wasn't completely sure I was explaining it right anyway and do need to brush up on that. Thanks for pointing out what I was wrong with in my explanation ed :D
  • DerekAustin26DerekAustin26 Member Posts: 275
    Okay i've read the whole Subnetting Chapter. I respectively disagree.. Heres why... My default gateway is set as .2 but the first host is always suppose to be .1 and the the proceeding devices after that are .2, .3 etc ... depending on what subnet your in.. but since these are Class A Ip's with a Class C Subnetting Scheme the first device/host is gonna be .1 - Now with that said the default gateway on the 3550 switch should be 10.10.11.1 and it's IP can then be 10.10.11.2. As well as the 2900 switches' default gateway should be 10.10.12.1 and it's IP should be 10.10.12.2 .

    Now when i go to that router and i do the "int e0/0" then "ip address 10.10.11.1 255.255.255.0"
    This way the router will know that 3550's IP is on the subnet of 11 and 2900 is on subnet 12 and the routher will recognize the configuration of 3550 connected to e0/0 because the default gateways will match as well as for the e0/1.

    Before i had 3550's default gateway as .2 and the Router is showing .1 (check it out)
    If these dont match then the router wont know that the switch 3550 is needing to communicate with the Router(who is set at .1)

    Now tell me if this is correct?
  • LBC90805LBC90805 Member Posts: 247
    Okay i've read the whole Subnetting Chapter. I respectively disagree.. Heres why... My default gateway is set as .2 but the first host is always suppose to be .1 and the the proceeding devices after that are .2, .3 etc ... depending on what subnet your in.. but since these are Class A Ip's with a Class C Subnetting Scheme the first device/host is gonna be .1 - Now with that said the default gateway on the 3550 switch should be 10.10.11.1 and it's IP can then be 10.10.11.2. As well as the 2900 switches' default gateway should be 10.10.12.1 and it's IP should be 10.10.12.2 .

    Now when i go to that router and i do the "int e0/0" then "ip address 10.10.11.1 255.255.255.0"
    This way the router will know that 3550's IP is on the subnet of 11 and 2900 is on subnet 12 and the routher will recognize the configuration of 3550 connected to e0/0 because the default gateways will match as well as for the e0/1.

    Before i had 3550's default gateway as .2 and the Router is showing .1 (check it out)
    If these dont match then the router wont know that the switch 3550 is needing to communicate with the Router(who is set at .1)

    Now tell me if this is correct?

    Actually it doesn't matter what IP address you give the default gateway, just as long as the default gateway and the switch agree to what the IP address is and that all the other devices are operating in that same subnet. For instance you can give the router's Ethernet Interface an IP that ends .189, that is fine just as long as the switch, and other devices know the Default Gateway's address, knows where to send IP packets that are outside of the subnet it is operating on. I.E. default gateway address of x.x.x.189. True the first usable IP address with a /24 mask will be .1 but you don't have to assign that address to any device.
  • DerekAustin26DerekAustin26 Member Posts: 275
    I just figured the .1 or the first host of whatever subnet your on should be the default gateway (Default gateway = Router) And the Router is always the first device per each network.

    I mean just do an ipconfig on your computer and you'll see your default gateway ends with a .1 - They always do.
  • phoeneousphoeneous Member Posts: 2,333 ■■■■■■■□□□
    I just figured the .1 or the first host of whatever subnet your on should be the default gateway (Default gateway = Router) And the Router is always the first device per each network.

    I mean just do an ipconfig on your computer and you'll see your default gateway ends with a .1 - They always do.

    No.

    The gateway will not always be .1 but it is a good rule of thumb to make it so.

    Now, if you set either of your switches default-gateway's to .2, how is it going to now where to send frames that are on a different subnet? Youre theory is all wrong.

    And just because you give R1 an IP address of .1, its not going to now about the devices on the .2 network unless you configure routing protocols.

    Like everyone else said, this is basic networking.
  • networker050184networker050184 Mod Posts: 11,962 Mod
    I mean just do an ipconfig on your computer and you'll see your default gateway ends with a .1 - They always do.

    Like stated above not true. I know a lot of people who use the last address for the default gateway. There is no rule set in stone. You could pick any IP right from the middle of the range if you wanted to. Again basic networking you need to grasp.

    Windows IP Configuration
    
    
    Ethernet adapter Local Area Connection:
    
            Connection-specific DNS Suffix  . : ****.com
            IP Address. . . . . . . . . . . . : ***.***.***.17
            Subnet Mask . . . . . . . . . . . : 255.255.255.0
            Default Gateway . . . . . . . . . : ***.***.***.254
    
    An expert is a man who has made all the mistakes which can be made.
  • DerekAustin26DerekAustin26 Member Posts: 275
    Okay then can someone give me the configuration should set for each switch and the router itself so i can get these 2 switches to communicate through the router? This way i can have a good example of what your talking about. Appreciate it.
  • networker050184networker050184 Mod Posts: 11,962 Mod
    Just use a default gateway of the routers ethernet address what ever that may be.
    An expert is a man who has made all the mistakes which can be made.
  • malcyboodmalcybood Member Posts: 900 ■■■□□□□□□□
    If you had a Speedtouch 546 v6 ADSL router and reset it to factory defaults, the default gateway is 192.168.1.254

    It's usually the first few addresses reserved for static IP addresses or the last few, but you could make your default Gateway 192.168.1.178 if you wanted to. There's no stipulation it has to be .1 it's just good practice.

    Also if you have a subnet of 172.106.17.168 with a mask of 255.255.255.248 (or /29) then your first usable host would be 172.106.17.169 - You wont always get subnets starting ".0"
  • DerekAustin26DerekAustin26 Member Posts: 275
    Can someone just provide me the correct configuration for each switch and the router so i can implement this basic network and get a good hands on understanding of this please?
  • networker050184networker050184 Mod Posts: 11,962 Mod
    Can someone just provide me the correct configuration for each switch and the router so i can implement this basic network and get a good hands on understanding of this please?


    switch1#(config)int vlan 1
    switch1#(config)ip address (your switches ip address)
    switch1#(config)ip default-gateway (routers ethernet port ip)


    switch2#(config)int vlan 1
    switch2#(config)ip address (your switches ip address)
    switch2#(config)ip default-gateway (routers ethernet port ip)


    Something along those lines should work.

    How do you expect to learn if we give you all the answers anyway? I really suggest you learn the why first and not just the how.
    An expert is a man who has made all the mistakes which can be made.
  • DerekAustin26DerekAustin26 Member Posts: 275
    well this is how i implemented it...
    RouterA:router# conf trouter(config)#ip routing

    (for interface connected to switchA)
    router(config)#interface eth0/0
    router(config-if)#ip address 10.10.11.1 255.255.255.0
    router(config-if)#no shutdown

    (for interface connected to switchB)
    router(config)#interface eth0/1
    router(config-if)#ip address 10.10.12.1 255.255.255.0
    router(config-if)#no shutdown

    switchA:
    switch#conf t
    switch(config)#ip default-gateway 10.10.11.1
    switch(config)#interface vlan 1
    switch(config-if)#ip address 10.10.11.2 255.255.255.0
    switch(config-if)#no shutdown

    switchB:
    switch#conf t
    switch(config)#ip default-gateway 10.10.12.1
    switch(config)#interface vlan 1
    switch(config-if)#ip address 10.10.12.2 255.255.255.0
    switch(config-if)#no shutdown

    I believe this is correct...
  • DerekAustin26DerekAustin26 Member Posts: 275
    well this is how i implemented it...
    RouterA:
    router# conf t
    router(config)#ip routing

    (for interface connected to switchA)
    router(config)#interface eth0/0
    router(config-if)#ip address 10.10.11.1 255.255.255.0
    router(config-if)#no shutdown

    (for interface connected to switchB)
    router(config)#interface eth0/1
    router(config-if)#ip address 10.10.12.1 255.255.255.0
    router(config-if)#no shutdown

    switchA:
    switch#conf t
    switch(config)#ip default-gateway 10.10.11.1
    switch(config)#interface vlan 1
    switch(config-if)#ip address 10.10.11.2 255.255.255.0
    switch(config-if)#no shutdown

    switchB:
    switch#conf t
    switch(config)#ip default-gateway 10.10.12.1
    switch(config)#interface vlan 1
    switch(config-if)#ip address 10.10.12.2 255.255.255.0
    switch(config-if)#no shutdown

    I believe this is correct...(minor adjustments)
  • networker050184networker050184 Mod Posts: 11,962 Mod
    Looks good to me. Does it work?
    An expert is a man who has made all the mistakes which can be made.
  • malcyboodmalcybood Member Posts: 900 ■■■□□□□□□□
    Can someone just provide me the correct configuration for each switch and the router so i can implement this basic network and get a good hands on understanding of this please?

    No offence but no need for the attitude. What do you learn coming on a website and saying to people "Can someone just provide me the correct configuration for each switch and the router"??

    Would you say that in a job scenario if you couldn't figure something out?

    Looking at the original post you hadn't grasped the difference / relationship between a default gateway on a switch and a router interface IP address.

    Everyone needs a helping hand sometimes, but I think you should try to familiarise yourself with the basic networking theory as opposed to skipping into configuring routers and switches by demanding a config from the other forum members.
  • DerekAustin26DerekAustin26 Member Posts: 275
    Well when someone shows you how to build a computer for you.. You learn. When someone shows you how to do anything you learn. You look at how something is done and associate that to other common problems.

    I see the reasoning of why i had it wrong now.. When i first started out i had my default gateways wrong and now i've learned that the default gateways on your switches have to match what your router's interface is.

    I understand it now. Thanks guys!
  • malcyboodmalcybood Member Posts: 900 ■■■□□□□□□□
    Fair enough, glad you have it sorted and you understand it - that is the key.....understanding what you're doing when it actually works, hence why the community try to encourage reading up on the theory as well as doing the fun configuration part icon_cool.gif

    Good luck with the rest of your studies
Sign In or Register to comment.