02-17-2020 02:34 AM
I have connected a modem on switch port 23 and below config is the config on router subinterface and switch port.
This is not working. I can't ping the next hop x.x.x.97. This was working when modem was connected directly to the router.
Any suggestions?
ROUTER
interface GigabitEthernet0/0.110
encapsulation dot1Q 110
vrf forwarding IWAN-PUBLIC
ip address x.x.x.108 255.255.255.240
SWITCH
interface FastEthernet0/23
switchport access vlan 110
switchport mode access
02-17-2020 02:46 AM
Hi
Is the modem is the front facing device with the WAN IP address to get out to the internet ?
It should be connected to the router not the switch , why are you connecting it to the switch ?
the modem wold have to understand how to route back if its connected somewhere else , but if its a modem for the internet it should be connected to the router
good example of RnS
02-17-2020 02:53 AM
Yes modem is a front facing device with WAN IP. There is no free port on the router. Hence, router on a stick.
Router is a CISCO1921/K9 with Gi0/0 connected to switch and Gi0/1 connect to Primary Internet link. The modem in question is secondary connection.
02-17-2020 03:28 AM
Make sure the router port connected to switch is trunk and allowed that vlan 110
02-17-2020 03:39 AM
Yes. Router is connected on Gi0/1 of switch and 110 vlan is allowed on it.
SW-10#sh int trunk
Port Mode Encapsulation Status Native vlan
Fa0/24 on 802.1q trunking 4
Gi0/1 on 802.1q trunking 2
Gi0/2 on 802.1q trunking 4
Port Vlans allowed on trunk
Fa0/24 1-4094
Gi0/1 1-4094
Gi0/2 1-4094
Port Vlans allowed and active in management domain
Fa0/24 1-2,4,52-57,110
Gi0/1 1-2,4,52-57,110
Gi0/2 1-2,4,52-57,110
Port Vlans in spanning tree forwarding state and not pruned
Fa0/24 1-2,4,52-57,110
Gi0/1 1-2,4,52-57,110
Gi0/2 1-2,4,52-57,110
02-17-2020 03:45 AM
When you did connect the modem to router port for test then what is the configuration you do on router interface
02-17-2020 03:55 AM
Below is the config on router which was working. After moving modem to switch, I created a subinterface with 110 vlan, created L2 vlan 110 on switch and configured switch port connected to modem as access port for vlan 110.
interface GigabitEthernet0/1
vrf forwarding IWAN-PUBLIC
ip address x.x.x.108 255.255.255.240
duplex auto
speed auto
ip route vrf IWAN-PUBLIC 0.0.0.0 0.0.0.0 x.x.x.97
02-17-2020 04:06 AM
Hello,
it gets really confusing now to figure out what you have connected to what. Post a schematic drawing of your topology so we can see which devices are connected to which devices.
A switch is a layer 2 device, you cannot use that as a substitue for a router...
02-17-2020 05:46 AM
Router gi0/0 - connected to switch on Gi0/1
Switch Fa0/23 - connected to Modem.
Config on router --
interface GigabitEthernet0/0
Description - SW1
no ip address
load-interval 30
duplex full
speed 1000
end
interface GigabitEthernet0/0.2
description Data VLAN
encapsulation dot1Q 2 native
ip address y.y.y.2 255.255.255.0
ip access-group wormkiller in
ip access-group wormkiller out
ip directed-broadcast
ip wccp 61 redirect in
ip pim dr-priority 200
ip pim sparse-dense-mode
end
interface GigabitEthernet0/0.110
description Modem
encapsulation dot1Q 110
vrf forwarding IWAN-PUBLIC
ip address x.x.x.108 255.255.255.240
no cdp enable
end
ip route vrf IWAN-PUBLIC 0.0.0.0 0.0.0.0 x.x.x.97
Config on Switch ---------------------------------------------------------
interface FastEthernet0/23
description Modem
switchport access vlan 110
switchport mode access
end
interface GigabitEthernet0/1
description RTR01
switchport trunk native vlan 2
switchport mode trunk
mls qos trust cos
I tested modem by connecting it on Router Gi0/1 with below config and I was able to ping the next hop - x.x.x.97
interface GigabitEthernet0/1
description Modem
vrf forwarding IWAN-PUBLIC
ip address x.x.x.108 255.255.255.240
duplex auto
speed auto
ip route vrf IWAN-PUBLIC 0.0.0.0 0.0.0.0 x.x.x.97
Hope this clears the confusion.
02-17-2020 03:44 AM
Hello,
post the full running configs (sh run) of both the router and the switch...
02-17-2020 07:55 AM
Hello
@Shruti3482 wrote:
Yes modem is a front facing device with WAN IP. There is no free port on the router. Hence, router on a stick.
Router is a CISCO1921/K9 with Gi0/0 connected to switch and Gi0/1 connect to Primary Internet link. The modem in question is secondary connection.
Why are you making gig0/0 on the router a subinterface for vlan 110, does it need to be, Can you not just have its a normal routed port and have the two ports on the switch interconnecting the router and the modem access port vlan 1.
If the router gig0/0 needs to be in a subinterface for vlan110, then make the port on the switch connecting to the router a trunk port and the port connecting to the modem an access port in vlan 110, but dont forget in a vrf you need to ping the vrf table
ping vrf WAN-PUBLIC x.x.x.97
02-18-2020 03:44 AM
Hi Paul, I am creating sub-interface because there is no free port on router.
And yes I am pinging using vrf.
See below .. Hope this helps in understanding the scenario -
Router gi0/0 - connected to switch on Gi0/1
Switch Fa0/23 - connected to Modem.
Config on router --
interface GigabitEthernet0/0
Description - SW1
no ip address
load-interval 30
duplex full
speed 1000
end
interface GigabitEthernet0/0.2
description Data VLAN
encapsulation dot1Q 2 native
ip address y.y.y.2 255.255.255.0
ip access-group wormkiller in
ip access-group wormkiller out
ip directed-broadcast
ip wccp 61 redirect in
ip pim dr-priority 200
ip pim sparse-dense-mode
end
interface GigabitEthernet0/0.110
description Modem
encapsulation dot1Q 110
vrf forwarding IWAN-PUBLIC
ip address x.x.x.108 255.255.255.240
no cdp enable
end
ip route vrf IWAN-PUBLIC 0.0.0.0 0.0.0.0 x.x.x.97
Config on Switch ---------------------------------------------------------
interface FastEthernet0/23
description Modem
switchport access vlan 110
switchport mode access
end
interface GigabitEthernet0/1
description RTR01
switchport trunk native vlan 2
switchport mode trunk
mls qos trust cos
I tested modem by connecting it on Router Gi0/1 with below config and I was able to ping the next hop - x.x.x.97
interface GigabitEthernet0/1
description Modem
vrf forwarding IWAN-PUBLIC
ip address x.x.x.108 255.255.255.240
duplex auto
speed auto
ip route vrf IWAN-PUBLIC 0.0.0.0 0.0.0.0 x.x.x.97
02-18-2020 05:06 AM
Hello,
post a schematic drawing of your topology. You cannot connect the modem to a switch and the router to the switch as well. What brand/model are the router and the switch ?
02-18-2020 05:36 AM
I believe the connections cannot be like this
Modem ----------- switch--------- router
as the ISP is going to give a single IP space
https://www.quora.com/Can-I-connect-the-modem-to-the-switch-then-to-the-router
But yes, network diagram would be of great help.
02-21-2020 03:29 AM
See below .. Hope this helps in understanding the scenario -
Router gi0/0 - connected to switch on Gi0/1
Switch Fa0/23 - connected to Modem.
Config on router --
interface GigabitEthernet0/0
Description - SW1
no ip address
load-interval 30
duplex full
speed 1000
end
interface GigabitEthernet0/0.2
description Data VLAN
encapsulation dot1Q 2 native
ip address y.y.y.2 255.255.255.0
ip access-group wormkiller in
ip access-group wormkiller out
ip directed-broadcast
ip wccp 61 redirect in
ip pim dr-priority 200
ip pim sparse-dense-mode
end
interface GigabitEthernet0/0.110
description Modem
encapsulation dot1Q 110
vrf forwarding IWAN-PUBLIC
ip address x.x.x.108 255.255.255.240
no cdp enable
end
ip route vrf IWAN-PUBLIC 0.0.0.0 0.0.0.0 x.x.x.97
Config on Switch ---------------------------------------------------------
interface FastEthernet0/23
description Modem
switchport access vlan 110
switchport mode access
end
interface GigabitEthernet0/1
description RTR01
switchport trunk native vlan 2
switchport mode trunk
mls qos trust cos
I tested modem by connecting it on Router with below config and I was able to ping the next hop - x.x.x.97
interface GigabitEthernet0/1
description Modem
vrf forwarding IWAN-PUBLIC
ip address x.x.x.108 255.255.255.240
duplex auto
speed auto
ip route vrf IWAN-PUBLIC 0.0.0.0 0.0.0.0 x.x.x.97
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: