10-05-2019 03:59 PM
Hello all,
I need to connect two routers (IP: 10.1.1.2/24 (router 1) and 10.1.1.1/24 (router 2)) with a switch and be able to ping router router 1 from router 2. I executed below commands but so far, it is not working.
R1(config)#int fa0/0
R1(config-if)#ip address 10.1.1.2 255.255.255.0
R1(config-if)#no shut
R2(config)#int fa0/0
R2(config-if)#ip address 10.1.1.1 255.255.255.0
R2(config-if)#no shut
Switch(config)#int fa0/0
Switch(config-if)#ip address 10.1.1.3 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#int fa0/1
Switch(config-if)#ip address 10.1.1.4 255.255.255.0
% 10.1.1.0 overlaps with FastEthernet0/0
Please let me know if you have any suggestion.
Thank you.
Solved! Go to Solution.
10-05-2019 04:07 PM
Try below config on switch :
config t
vlan 10 <<-- you can create any vlan here - make sure access port belong to same vlan
Switch(config)#int fa0/0
Switch(config-if)#switch mode access
Switch(config-if)#switchport access vlan 10
Switch(config-if)#no shut
Switch(config-if)#int fa0/1
Switch(config-if)#switch mode access
Switch(config-if)#switchport access vlan 10
Switch(config-if)#no shut
!
interface vlan 10
ip address 10.1.1.3 255.255.255.0
no shut
!
end
wr
10-05-2019 04:07 PM
Try below config on switch :
config t
vlan 10 <<-- you can create any vlan here - make sure access port belong to same vlan
Switch(config)#int fa0/0
Switch(config-if)#switch mode access
Switch(config-if)#switchport access vlan 10
Switch(config-if)#no shut
Switch(config-if)#int fa0/1
Switch(config-if)#switch mode access
Switch(config-if)#switchport access vlan 10
Switch(config-if)#no shut
!
interface vlan 10
ip address 10.1.1.3 255.255.255.0
no shut
!
end
wr
10-08-2019 12:23 PM
10-05-2019 04:43 PM
Hi @Ylli
If you are working on PacketTracer, compress your exercise (winzip) and attach it to review.
Theoretically, you should not be able to enter an IP into the physical interfaces of a layer2 switch, so I would like to see your exercise.
Regards
10-08-2019 12:21 PM
10-05-2019 10:40 PM
Hi,
Try with below commands:
vlan 100
!
interface VLAN 100
IP address 10.1.1.3 255.255.255.0
!
interface range fa0/0, fa0/1
Description "Connected-to-Routers"
switchport mode access
switch access vlan 100
!
!
Why are you failed? You failed to add because we can't add an overlapping subnet on two difference Layer 3 interfaces in a single switch or router without any virtualization option such as VRF.
10-06-2019 01:37 PM
The original post presents a pretty simple requirement: 2 routers, connecting their interface to a switch must be able to ping each other. The proposed router config in the original post is reasonable - it puts IP addresses in the same subnet on the router interfaces and does no shut. On the switch the requirement can be achieved by putting the 2 switch interfaces connecting to the routers in to the same vlan, it might be vlan 1 or might be vlan 10, or might be whatever vlan number you like (and making the switch interfaces access ports) and perhaps no shut on the interfaces. While it might be nice for the switch to have an IP address, in terms of the original requirement that the routers connect to a switch and be able to ping each other I do not see any requirement for the switch to have an IP address.
HTH
Rick
10-08-2019 01:01 PM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide