Routing on L3Switch without a router

sendalotsendalot Member Posts: 328
How do you enable intervlan communication between different vlans on a L3Switch without involving a router?

So many questions..

So do each vlan gets a different default gw on L3Switch?

Is tagging not involved since intervlan communication happens all in the inside?

Do you need a route in the L3Switch for the hosts to be able to talk to each other?

Thanks.

Comments

  • smarkyosmarkyo Member Posts: 5 ■□□□□□□□□□
    Here's a simple config...

    PC1

    Switch
    PC2

    PC1 (connects to f0/2): PC1 ip address is 20.0.0.20 255.0.0.0; the default gateway is set to 20.0.0.1
    PC2 (connects to f0/3): PC2 ip address is 30.0.0.30 255.0.0.0; the default gateway is set to 30.0.0.1

    Switch Configurations:
    1) Create VLAN 2 & VLAN 3 broadcast domains

    2) Assign f0/2 (PC1) as access port in VLAN 2
    Assign f0/3 (PC2) as access port in VLAN 3

    3) Create interface VLAN 2: ip address 20.0.0.1 255.0.0.0 (this will be the default-gateway for PC1 in VLAN 2)
    Create interface VLAN 3: ip address 30.0.0.1 255.0.0.0 (this will be the default-gateway for PC2 in VLAN 3)

    4) enable ip routing on the layer 3 switch

    for your questions..
    1) The VLAN interfaces act as the default-gateways for the VLAN broadcast domains.

    2) No tagging. A trunk interface isn't required to route w/ one L3 switch and the routing happens between access ports which don't carry tagged frames.

    3) When you enable IP routing, the routing table on the L3 switch will show directly connected routes to the VLAN broadcast domains.
  • theodoxatheodoxa Member Posts: 1,340 ■■■■□□□□□□
    SW1(config)# ip routing

    SW1(config)# interface range FastEthernet 0/1-8
    SW1(config-if)# switchport access vlan 10
    SW1(config-if)# switchport mode access
    SW1(config-if)# switchport nonegotiate
    SW1(config-if)# spanning-tree portfast
    SW1(config-if)# no shutdown
    SW1(config-if)# exit

    SW1(config)# interface range FastEthernet 0/9-16
    SW1(config-if)# switchport access vlan 20
    SW1(config-if)# switchport mode access
    SW1(config-if)# switchport nonegotiate
    SW1(config-if)# spanning-tree portfast
    SW1(config-if)# no shutdown
    SW1(config-if)# exit

    SW1(config)# interface range FastEthernet 0/24
    SW1(config-if)# no switchport
    SW1(config-if)# ip address 10.255.255.2 255.255.255.252
    SW1(config-if)# no shutdown
    SW1(config-if)# exit

    SW1(config)# spanning-tree bpduguard default

    SW1(config)# interface vlan 10
    SW1(config-if)# ip address 192.168.10.1 255.255.255.0
    SW1(config-if)# no shutdown
    SW1(config-if)# exit

    SW1(config)# interface vlan 20
    SW1(config-if)# ip address 192.168.20.1 255.255.255.0
    SW1(config-if)# no shutdown
    SW1(config-if)# exit

    SW1(config)# ip dhcp excluded-address 192.168.10.1 192.168.10.99
    SW1(config)# ip dhcp excluded-address 192.168.20.1 192.168.20.99

    SW1(config)# ip dhcp pool VLAN10
    SW1(dhcp-config)# network 192.168.10.0 255.255.255.0
    SW1(dhcp-config)# default-router 192.168.10.1
    SW1(dhcp-config)# exit

    SW1(config)# ip dhcp pool VLAN20
    SW1(dhcp-config)# network 192.168.20.0 255.255.255.0
    SW1(dhcp-config)# default-router 192.168.20.1
    SW1(dhcp-config)# exit

    SW1(config)# router eigrp 100
    SW1(config-router)# no auto-summary
    SW1(config-router)# passive-interface default
    SW1(config-router)# network 192.168.10.0 0.0.0.255
    SW1(config-router)# network 192.168.20.0 0.0.0.255
    SW1(config-router)# no passive-interface FastEthernet 0/24
    SW1(config-router)# end

    This will create 2 SVIs (VLAN 10 and VLAN 20), assign them IP Addresses and DHCP Pools, and Assign 8 Ports to each VLAN. It also enables EIGRP, placing configuring all ports except Fa0/24 as passive, and advertising the 2 VLANs' networks.
    R&S: CCENT CCNA CCNP CCIE [ ]
    Security: CCNA [ ]
    Virtualization: VCA-DCV [ ]
Sign In or Register to comment.