2

I have this scenario in my home lab

enter image description here

My cisco 2600 router has only 1 physical interface so i have divided into 3 sub interfaces

  1. E0/0.1 for vlan 10
  2. E0/0.2 FOR vlan 20
  3. E0/0.3 for vlan 1 which is in same subnet as my mian netgear router which is dhcp server
  4. The cisco switch is Layer 2 switch

  1. First i want to know that is this setup possible or need router two 2 interfaces
  2. i have setup default gateway to be 192.168.0.1 but i can't ping to it from router.

Internet on Laptop is working fine via ethernet cable and its getting valid ip from netgear router

  • 3
    Too much Google-fu missing on this question...5sec on google + 5min reading...and you have your answer .. e.g. firewall.cx/cisco-technical-knowledgebase/cisco-routers/… – cgasp Mar 29 '14 at 9:55
  • @cdq74cn my main problem is how does router know the route to netgear gateway – Mirage Mar 29 '14 at 11:47
  • @user19340357 The routing table – ponsfonze Mar 29 '14 at 20:36
  • Did any answer help you? if so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer. – Ron Maupin Aug 8 '17 at 20:42
5
  1. Yes, it is possible.

  2. You are doing something wrong, most likely tagging frames on the router but the trunk has VLAN 1 as native.

To confirm what your trunking settings are use:

show interfaces trunk

I like to keep the subinterface IDs matching the VLAN number although it is not required. Use a configuration like:

! Switch
! Port to Laptop
interface Fax/x
switchport mode access
switchport access vlan 1
spanning-tree portfast
description Port to PC
! Port to Netgear
interface Fax/x
switchport mode access
switchport access vlan 1
spanning-tree portfast
description Port to Netgear
! Port to Cisco router
interface Fax/x
switchport trunk encapsulation dot1q
switchport mode trunk
spanning-tree portfast trunk
description port to Cisco router

For the router:

! Router
! Port to switch
interface E0/0.1
encapsulation dot1q 1 native
ip add 192.168.0.70 255.255.255.0
description VLAN1 to Netgear
interface E0/0.10
encapsulation dot1q 10
ip add 192.168.10.70 255.255.255.0
description VLAN10
interface E0/0.20
encapsulation dot1q 20
ip add 192.168.20.70 255.255.255.0
description VLAN20
ip routing
ip route 0.0.0.0 0.0.0.0 192.168.0.1

Obviously replace IP with your desired IP in the subnet.

  • I think you put the pc and router on the same vlan. – Ron Trunk Mar 29 '14 at 13:32
  • I have done exactly like that and i can't ping from router to gateway 192.168.0.1 – Mirage Mar 29 '14 at 13:54
  • The config is here pastebin.com/6ttF5aVP – Mirage Mar 29 '14 at 14:25
  • It's not clear which VLAN should go where. Is the laptop using DHCP? Also paste the entire config of the router. – Daniel Dib Mar 29 '14 at 19:31
  • Yes the laptop is also using DHCP. vlan we can sort later. the only thing i want is to ping from router to netgear 192.168.0.1 . if my router connects to netgear then i can assign vlans as required – Mirage Mar 30 '14 at 0:23
0

It seems like there is a tagging issue on the switch on the port connecting to the default gateway. Have you specified the allowed vlans in the port? Try adding the command switchport trunk allowed vlan 1,10,20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.