Jump to content

Having trouble pinging a sub interface

Go to solution Solved by Lurick,
1 hour ago, Shammikit said:

-SNIP-

 

PC 2 has the wrong IP adddress and is in the wrong subnet. It should be 192.168.4.4, not 192.168.3.4.

i have two computers connected to a switch and that connected to a router.i have created vlans for the 2 computers as management and sales.then i have created sub interfaces at the router. using pc1 it is possible to ping the sub interface of it but im not able to ping the sub interface of pc2 using pc2. this is what i get in show running config.i have been stuck in this for several hours now and i couldnt find any solution to this in the internet.any help would be greatly appreciated.

 

interface GigabitEthernet0/0

no ip address

duplex auto

speed auto

!

interface GigabitEthernet0/0.1

encapsulation dot1Q 100

ip address 192.168.2.1 255.255.255.224

!

interface GigabitEthernet0/0.2

encapsulation dot1Q 101

ip address 192.168.5.3 255.255.255.224

!

interface GigabitEthernet1/0

no ip address

duplex auto

speed auto

shutdown

!

interface GigabitEthernet2/0

no ip address

duplex auto

speed auto

shutdown

!

--More--

 

 

Link to comment
https://linustechtips.com/topic/763669-having-trouble-pinging-a-sub-interface/
Share on other sites

Link to post
Share on other sites

What do the PC configs look like?

Could you paste screenshots?

Also, what does the switch config look like for the ports connected to the PCs and the uplink?

Current Network Layout:

Current Build Log/PC:

Storage Server Setup:

 

Prior Build Log/PC:

Link to post
Share on other sites

2 hours ago, Lurick said:

What do the PC configs look like?

Could you paste screenshots?

Also, what does the switch config look like for the ports connected to the PCs and the uplink?

-------------------------Router----------------------------------------

Router>en
Router#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int gig0/0
Router(config-if)#no ip add
Router(config-if)#no shut

Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up

Router(config-if)#int gig0/0.100
Router(config-subif)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0.100, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0.100, changed state to up

Router(config-subif)#encapsulation dot1q 100
Router(config-subif)#ip add 192.168.3.3 255.255.255.224
Router(config-subif)#int gig0/0.101
Router(config-subif)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0.101, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0.101, changed state to up

Router(config-subif)#encapsulation dot1q 101
Router(config-subif)#ip add 192.168.3.5 255.255.255.224
% 192.168.3.0 overlaps with GigabitEthernet0/0.100
Router(config-subif)#ip add 192.168.4.5 255.255.255.224
Router(config-subif)#end
Router#
%SYS-5-CONFIG_I: Configured from console by console

Router#show run
Building configuration...

Current configuration : 902 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface GigabitEthernet0/0
 no ip address
 duplex auto
 speed auto
!
interface GigabitEthernet0/0.100
 encapsulation dot1Q 100
 ip address 192.168.3.3 255.255.255.224
!
interface GigabitEthernet0/0.101
 encapsulation dot1Q 101
 ip address 192.168.4.5 255.255.255.224
!
interface GigabitEthernet1/0
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface GigabitEthernet2/0
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface Serial3/0
 no ip address
 shutdown
!
interface Serial4/0
 no ip address
 shutdown
!
interface Serial5/0
 no ip address
 shutdown
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!

 

 

-------------------------------------------Switch-------------------------------------------

 

Switch>enable

Switch#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#vlan 100

Switch(config-vlan)#name management

Switch(config-vlan)#vlan 101

Switch(config-vlan)#name sales

Switch(config-vlan)#int range fa0/1-2

Switch(config-if-range)#switchport mode access

Switch(config-if-range)#spanning-tree portfast

%Warning: portfast should only be enabled on ports connected to a single

host. Connecting hubs, concentrators, switches, bridges, etc... to this

interface when portfast is enabled, can cause temporary bridging loops.

Use with CAUTION

 

%Portfast will be configured in 2 interfaces due to the range command

but will only have effect when the interfaces are in a non-trunking mode.

Switch(config-if-range)#int fa0/1

Switch(config-if)#switchport access vlan 100

Switch(config-if)#int fa0/2

Switch(config-if)#switchport access vlan 101

Switch(config-if)#int fa0/4

Switch(config-if)#switchport mode trunk

Switch(config-if)#

%LINK-5-CHANGED: Interface FastEthernet0/4, changed state to up

 

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to up

 

 

------------------------------PC1-------------------------

ip address: 192.168.3.2

subnet mask: 255.255.255.224

gateway: 192.168.3.3

 

--------------------------------pc2--------------------------------- 

ip address: 192.168.3.4

subnet mask: 255.255.255.224

gateway: 192.168.4.5

 

Link to post
Share on other sites

1 hour ago, Shammikit said:

-SNIP-

 

PC 2 has the wrong IP adddress and is in the wrong subnet. It should be 192.168.4.4, not 192.168.3.4.

Current Network Layout:

Current Build Log/PC:

Storage Server Setup:

 

Prior Build Log/PC:

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×