04-23-2013 07:22 AM - edited 03-07-2019 12:59 PM
Hello every one,
I actually starting to work on a cisco project. I'm a beginner on networking and cisco technologie.
For my project we use a router 2921.
We got two network:
- Network A: 192.198.0.X / 255.255.255.0 / Gateway 192.198.0.1
- Network B: 162.168.0.X / 255.255.0.0 / Gateway 162.168.0.1
Each network use switch, Switch A (connecting to network A) is connected to interface G0/0.
And Switch B (connecting to network B) is connected to interface G0/1.
Router well configured as:
- G0/0: ip address 192.198.0.1 255.255.255.0 (network A)
- G0/1: ip address 162.168.0.1 255.255.0.0 (network B)
Every think working fine.
The problem is with this one, we need to connect a computer on G0/2. This computer is configure as network A (192.198.0.10 / 255.255.255.0 and same gateway).
I can't configure G0/2 as 192.198.0.1 255.255.255.0 (network A), cause G0/0 use this adresse.
I can't put this computer on the switch A, my only physical possibilité is to connect him on G0/2.
We just need to use interface G0/0 and G0/2 as a switch on the router with the same gateway (192.198.0.1)
.
How can i connect this computeur? How can i configure two interfaces on the same network and same gateway?
Thanks you
04-23-2013 10:10 PM
Hi Yoann,
So if I understand you query you are trying to configure the G0/2 on the same router which has G0/0 and G0/1 interface.
If yes then thats true you cannot have same ip address on two interfaces of same device.
What exactly are you trying to achive here?
why dont we cannot the PC to the switch A and configure the ip address to be in the same subnet and put the default gateway of G0/0.
HTH
Regards
Inaayath
04-24-2013 12:42 AM
Hi,
Yes it's what we try to do!
The main problem is, we can't put le PC on the switch A, because the switch A is at 80 meters from the router. We need it near the router. We cannot add an extrat switch near the routeur for connect the router before the 80 meters, we don't got the physical place for it. The only possibility is to connect the PC on the router. So to G0/2!
Of course, as you said, i can't configure G0/2 with the same ip address on two interfaces of the same device.
I tried to do a bridge on the router to connect the two interfaces to it. I use the command "no shutdown" on bridge and interface. But when i turn off/ turn on, the bridge is down and one of the interface to.
What it's the other possibilities? use another adresse on G0/2, and of course another gateway for the PC, or is there a solution for use two interface (G0/0 and G0/2) as a switch on a router?
Best Regards
04-24-2013 05:09 AM
Hi,
You cannot have same network IP address in any two or more interfaces in a router. So what you are trying is not possible. Also you cannot use that port as switch port.
You can use that port in another network and router will perform the routing between your networks. The router port Gi0/2 will act as a gateway for your server at that port.
04-24-2013 10:58 AM
I would just put the PC on a different network, but if you really want it to be in the same network, you could use IRB to connect two of the interfaces on the router at layer 2.
Here is an example config for IRB:
interface FastEthernet0/0
bridge-group 1
!
interface FastEthernet0/1
bridge-group 1
!
bridge irb
!
interface BVI1
ip address 192.168.0.1 255.255.255.0
!
bridge 1 route ip
Notice that the physical ports do not have IP addresses on them, the IP for the subnet is on the BVI interface.
04-25-2013 12:39 AM
I tried the IRB solution, It's a good one.
It's working and doing the job. So I put it in the startup-config but when i turn off and restart the router, IRB config doesn't work.
BVI lost is IP config, one interface take the IP config and of course the second interface don't start because two interfaces can't have the same IP config.
Is that normal?
04-25-2013 10:25 AM
That is not normal.
Are you certain you copieed the running configuration to the startup configuration prior to restarting the device?
Does the rest of the IRB configuration load other then the IPs?
Did you remove the IP from the physical port prior to puting it on the BVI interface?
04-29-2013 02:36 AM
I remove physical port IP and i put bridge-group x
I put IP on BVI interface.
After check that every thing is correct, i do:
copy running-config startup-config
And I think yes the rest of the IRB config is load, 'no shutdown' and 'mask' was presentes.
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