cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1140
Views
0
Helpful
4
Replies

Routing VLANs to Internet Cisco 2960 X

Nqabeni
Level 1
Level 1

Good day all, 

 

I have a cisco 2960 X with two vlans, vlan 1 and vlan 2. I have an ADSL router on port 23 (router ip 192.168.1.254)

interface Vlan1
ip address 192.168.1.251 255.255.255.0
ip helper-address 192.168.1.1

interface Vlan2
ip address 192.168.2.1 255.255.255.0
ip access-group 01 in
ip helper-address 192.168.1.1

 

sh ip default-gateway
192.168.1.251


sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
+ - replicated route, % - next hop override

 

Gateway of last resort is not set

192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.0/24 is directly connected, Vlan1
L 192.168.1.251/32 is directly connected, Vlan1
192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.2.0/24 is directly connected, Vlan2
L 192.168.2.1/32 is directly connected, Vlan2

 

show sdm prefer
The current template is "lanbase-routing" template.
The selected template optimizes the resources in
the switch to support this level of features for
0 routed interfaces and 255 VLANs.

number of unicast mac addresses: 4K
number of IPv4 IGMP groups + multicast routes: 0.375k
number of IPv4 unicast routes: 0.875k
number of directly-connected IPv4 hosts: 0.875k
number of indirect IPv4 routes: 80
number of IPv6 multicast groups: 0.25K
number of IPv6 unicast routes: 0.875k
number of directly-connected IPv6 addresses: 0.75K
number of indirect IPv6 unicast routes: 32
number of IPv4 policy based routing aces: 0
number of IPv4/MAC qos aces: 0.375k
number of IPv4/MAC security aces: 0.375k
number of IPv6 policy based routing aces: 0
number of IPv6 qos aces: 0.125k
number of IPv6 security aces: 0.25K

 

Problem is I can't seem to connect both vlans to internet access, IP Route doesn't seem to work.

Any thoughts, I believe I am amiss by inch.

 

I am gracious for your input.

 

4 Replies 4

nazimkha
Level 4
Level 4
I think the default gateway should be set to the router IP

Hi Nazimkha, I tried that and it didnt work.

Can you ping the router IP ?

 

How did you put the default gateway

ip defaul-gateway or ip route 0.0.0.0 0.0.0.0 <router-ip>

S-Lemming
Level 1
Level 1

You need to enable ip routing and then add a static default route: ip route 0.0.0.0 0.0.0.0 192.168.1.251.

 

The ip default-gateway command only works for the switch management plane, not for routing traffic.

Review Cisco Networking for a $25 gift card