Anybody know why this vlan config wont work

I have a router using ospf and a switch connected to the router. The switch and the router are connected using the fa0/1 on the router and the fa0/1 on the switch

Here are the running configs..... Just wondering why I cant ping 172.16.1.2 from the router, and 172.16.1.1 from the switch

SWITCH: ! hostname Switch ! ip subnet-zero ! interface FastEthernet0/1 keepalive 10 switchport mode trunk ! interface FastEthernet0/2 ! ! interface VLAN1 ip address 172.16.1.2 255.255.255.0 no ip directed-broadcast no ip route-cache ! ip default-gateway 172.16.1.1 ! line con 0 transport input none stopbits 1 line vty 0 4 login line vty 5 15 login ! end

VLAN1 is up, line protocol is up Hardware is CPU Interface, address is 0008.a494.42c0 (bia 0008.a494.42c0) Internet address is 172.16.1.2/24 MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation ARPA, loopback not set

ROUTER

Router#sh run Building configuration...

Current configuration : 1124 bytes ! version 12.1 service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname Router ! memory-size iomem 25 ip subnet-zero ! interface FastEthernet0/0 no ip address shutdown duplex auto speed auto ! interface FastEthernet0/0.1 encapsulation dot1Q 1 ip address 192.169.1.1 255.255.255.0 ! interface Serial0/0 ip address 172.16.100.1 255.255.255.252 clockrate 56000 ! interface FastEthernet0/1 no ip address duplex auto speed auto ! interface FastEthernet0/1.1 encapsulation dot1Q 1 ip address 172.16.1.1 255.255.255.0 ! interface FastEthernet0/1.10 encapsulation dot1Q 10 ! interface FastEthernet0/1.20 encapsulation dot1Q 20

router ospf 1 log-adjacency-changes network 172.16.1.0 0.0.0.255 area 0 network 172.16.100.0 0.0.0.255 area 0 network 172.16.0.0 0.0.255.255 area 0 default-information originate ! ip classless no ip http server ! ! line con 0 line aux 0 line vty 0 4 ! no scheduler allocate end

Reply to
sean courtney
Loading thread data ...

I checked, and checked again using your advice.

I think this switch is only capable of .1q encapsulation, but here is the interface output

Switch#en Switch#sh int fa0/1 switchport Name: Fa0/1 Switchport: Enabled Administrative Mode: trunk Operational Mode: trunk Administrative Trunking Encapsulation: dot1q Operational Trunking Encapsulation: dot1q Negotiation of Trunking: On Access Mode VLAN: 1 (default) Trunking Native Mode VLAN: 1 (default) Administrative private-vlan host-association: none Administrative private-vlan mapping: none Operational private-vlan: none Trunking VLANs Enabled: ALL Pruning VLANs Enabled: 2-1001

Protected: false

Voice VLAN: none (Inactive) Appliance trust: none

Reply to
sean courtney

[cut]

check the trunk encapsulation type on the switch interface f0/1. the default is isl on older switches supporting this, and you have 802.1q configured on the router.

on the "show interface f0/1 switchport" output you should see the trunk encapsulation, ex.:

3500xl#sh int f0/1 switchport Name: Fa0/1 Switchport: Enabled Administrative mode: trunk Operational Mode: trunk Administrative Trunking Encapsulation: isl Operational Trunking Encapsulation: isl Negotiation of Trunking: Disabled Access Mode VLAN: 0 ((Inactive)) Trunking Native Mode VLAN: 1 (default) Trunking VLANs Enabled: ALL Trunking VLANs Active: 1,100,200,201,300 Pruning VLANs Enabled: 2-1001

Priority for untagged frames: 0 Override vlan tag priority: FALSE Voice VLAN: none Appliance trust: none Self Loopback: No

you can change the trunk encapsulation type using: (config-if)# switchport trunk encapsulation dot1q

Reply to
Krzysztof Ciep³ucha

Router(config)#int fa0/0 Router(config-if)#no shutdown

Ah the simple things in life!

Alan

Reply to
hessaacd

While he doesn't actually give us the physical topology, I'd guess from the addresses that the router port connected to the switch was really F0/1 and that F0/0 was intentionally shut down. Since the switch has vlan1 defined as native and the router does not, they won't pass traffic properly for that vlan. Try this:

interface FastEthernet0/1 no ip address duplex auto speed auto ! interface FastEthernet0/1.1 encapsulation dot1Q 1 native

Reply to
Mike Dorn

Way too easy, thanks

Not enough coffee I guess

sean

Reply to
sean courtney

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.