IP Default Gateway

shimabukushimabuku Member Posts: 13 ■□□□□□□□□□
If I have a router and three switches (SW1, SW2, SW3) and all three of these switches are dasiy chained. SW1 is connected to the router is a layer 3 switch and is doing intervlan routing. SW2 is a layer 2 switch and is conneted to SW1 via trunk link. SW3 is a layer 2 switch and connected to SW2 via trunk link. Will SW2 and SW3 ip default gateway be 10.0.0.1?

Router:
G0/1 <--Switch-->
ip address 10.0.0.1 255.255.255.252
SW1:
Fa0/48 <--Router-->
ip address 10.0.0.2 255.255.255.252

VLAN99 <--Management-->
ip address 10.0.99.1 255.255.255.0

VLAN100 <--Servers-->
ip address 10.0.100.1 255.255.255.0

VLAN200 <--Users-->
ip address 10.0.200.1 255.255.255.0
SW2:
ip default gateway 10.0.0.1

VLAN99 <--Management-->
ip address 10.0.99.2 255.255.255.0
SW3:
ip default gateway 10.0.0.1

VLAN99<--Management-->
ip address 10.0.99.3 255.255.255.0

Comments

  • astorrsastorrs Member Posts: 3,139 ■■■■■■□□□□
    Should be 10.0.99.1, default gateway isn't going to work if it's in a separate subnet. :)
  • shimabukushimabuku Member Posts: 13 ■□□□□□□□□□
    astorrs wrote: »
    Should be 10.0.99.1, default gateway isn't going to work if it's in a separate subnet. :)

    So if there was a SW4 attached to SW3 the ip default gateway would be 10.0.99.1. So basically when daisy chaining layer 2 switches, the ip default gateway will always be the first usable ip address in that subnet of the management VLAN?
  • FloOzFloOz Member Posts: 1,614 ■■■■□□□□□□
    The default gateway address isn't necessarily the first usable ip of a subnet. It will be whatever you configured it to be. In this case though it will be the first usable ip.
  • shimabukushimabuku Member Posts: 13 ■□□□□□□□□□
    Ok, lets just say the routers Loopback0 is 10.0.99.1 and SW1 management ip is 10.0.99.2. SW2 and SW3 ip default-gateway will be 10.0.99.2?
  • FloOzFloOz Member Posts: 1,614 ■■■■□□□□□□
    Yup that would work
  • networker050184networker050184 Mod Posts: 11,962 Mod
    shimabuku wrote: »
    Ok, lets just say the routers Loopback0 is 10.0.99.1 and SW1 management ip is 10.0.99.2. SW2 and SW3 ip default-gateway will be 10.0.99.2?

    No, you aren't going to set the routers loopback as the DG. You want to use the routers address that is on the same L2 segment. The DG for a L2 switch is the same thing as setting it on a PC. The routers address that will handle the traffic that need to leave the local subnet.
    An expert is a man who has made all the mistakes which can be made.
  • FloOzFloOz Member Posts: 1,614 ■■■■□□□□□□
    I don't think he is saying that he is setting the DG to the loopback. I believe he was just confused on the whole "Does the first usable ip of a subnet need to be my DG thing".
  • networker050184networker050184 Mod Posts: 11,962 Mod
    If he's saying to use the other switch as the DG then that is not a good idea either.
    An expert is a man who has made all the mistakes which can be made.
  • EdTheLadEdTheLad Member Posts: 2,111 ■■■■□□□□□□
    This isn't going to work!
    Looking at the original post, you need to do this.

    Change the mask on the router to be large enough to support all switches, lets say /29 i.e. 10.0.0.1/29
    On SW1 Fa0/48 should be a switchport i.e. access lets say vlan 1. Then you create an SVI for vlan 1, ip address 10.0.0.2/29.
    Now for a sanity check you should be able to ping the router from the switch.
    Next configure vlan 1 on all switches, inter-switch link should be a trunk that allows vlan1.
    Each switch should have an SVI for vlan 1 configured with the appropriate ip address i.e. sw2 10.0.0.2/29, switch 3 10.0.0.3/29.
    Now all switches should be able to ping each other and the router ip.

    Now you can configure the default-gateway on every switch pointing to your layer 3 interface i.e. 10.0.0.1 on the router.
    So if you had a network 12.0.0.0/24 on another port on the router you would route all traffic destined for 12.0.0.0/24 to your default-gateway the router int 10.0.0.1.
    Networking, sometimes i love it, mostly i hate it.Its all about the $$$$
  • EdTheLadEdTheLad Member Posts: 2,111 ■■■■□□□□□□
    Oh, one more thing, if you want to route the other networks i.e. vlan 99,100,200 , you need to configure the router with subinterfaces, as follows and setup sw1 fa0/48 as a trunk port.

    On the router

    int x/x.1
    encapsulation dot1q 1 native
    ip address 10.0.0.1
    int x.x.99
    encapsulation dot1q 99
    ip address 10.0.99.1
    int x.x.100
    encapsulation dot1q 100
    ip address 10.0.100.1
    int x.x.200
    encapsulation dot1q 200
    ip address 10.0.200.1

    on sw1
    int fa0/48
    switchport
    switchport mode trunk
    switchport trunk allow vlans 1,99,100,200
    int vlan 1
    ip address 10.0.0.2/29
    int vlan 99
    ip address 10.0.99.2/29
    int vlan 100
    ip address 10.0.100.2/29

    Similar idea on all other switches, every switch will then be able to ping the router from the respective vlan.
    But you only have one default-network so only one vlan can ping of subnet.
    Networking, sometimes i love it, mostly i hate it.Its all about the $$$$
  • Dieg0MDieg0M Member Posts: 861
    SW1 is a multilayer switch so he can use it as his DG. If the hosts need to reach the router or any routes outbound from the router, dynamic or static routing between the router and SW1 needs to be configured. If he decides to use the router as his DG he needs to specify a DG that is reachable from SW3 like EdTheLad demonstrated.
    Follow my CCDE journey at www.routingnull0.com
  • FloOzFloOz Member Posts: 1,614 ■■■■□□□□□□
    Yah I was under the assumption that SW1 is a multilayer switch which he then could use as his DG
  • darkerzdarkerz Member Posts: 431 ■■■■□□□□□□
    FloOz wrote: »
    Yah I was under the assumption that SW1 is a multilayer switch which he then could use as his DG

    Networking's #1 law;

    Assume nothing, believe no one.

    :)
    :twisted:
  • Dieg0MDieg0M Member Posts: 861
    darkerz wrote: »
    Networking's #1 law;

    Assume nothing, believe no one.

    :)

    It is not an assumption.
    shimabuku wrote: »
    If I have a router and three switches (SW1, SW2, SW3) and all three of these switches are dasiy chained. SW1 is connected to the router is a layer 3 switch and is doing intervlan routing.
    Follow my CCDE journey at www.routingnull0.com
Sign In or Register to comment.