Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IP address secondary feature 4

Status
Not open for further replies.

GlennComiskey

Technical User
Jul 30, 2008
23
GB
Hi,

If I assign a secondary IP address from a different network to an ethernet interface, does the router perform routing between the two networks?

I.E. -
ip address 192.168.1.254 255.255.255.0
ip address 192.168.2.254 255.255.255.0 secondary

C2503>show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP, i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default, U - per-user static route, o - ODR

Gateway of last resort is not set

C 192.168.1.0/24 is directly connected, Ethernet0
C 192.168.2.0/24 is directly connected, Ethernet0

C2900>show vlan brief
VLAN Name Status Ports
---- -------------------------------- --------- -----
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4, Fa0/5, Fa0/6, Fa0/7, Fa0/8, Fa0/9, Fa0/10, Fa0/11, Fa0/12, Fa0/13, Fa0/14, Fa0/15, Fa0/16, Fa0/17, Fa0/18, Fa0/19, Fa0/24
2 VLAN0002 active Fa0/19, Fa0/20
3 VLAN0003 active Fa0/21
4 VLAN0004 active Fa0/22
5 VLAN0005 active Fa0/23

PC default gateway is 192.168.1.254 and want to connect to device 192.168.2.54: PC network 192.168.1.100 (Fa0/7) > Switch port Fa0/19 > Router > Internal routing > Router > Switch port Fa0/19 > Network device 192.168.2.54 (Fa0/20)
 
I would setup 802.1q trunking on the ethernet to seperate the networks.. Make the switch port connected to your router a trunk port then program to other switch port correclty for there vlans.


[americanflag] Go Army!
Tek-TIP Member 19,650
 
Why don't you trunk the link between the switch and the router with dot1q. Create your sub interfaces for the ethernet on the router. (one ip, one vlan each) and then just put whatever access interfaces you want in the vlans on the switch.
 
It always looks better when the same answer comes from different people...


[americanflag] Go Army!
Tek-TIP Member 19,650
 
Something like this:
router:

interface fastethernet 0/0.1
ip address 192.168.1.254 255.255.255.0
encapsulation dot1q 1 native

interface fastethernet 0/0.2
ip address 192.168.2.254 255.255.255.0
encapsulation dot1q 2


switch:
interface fastethernet 0/27
switchport mode trunk
switchport trunk encapsulation dot1q

Then just put the .1 network in vlan1 and the .2 network in vlan2. Add access interfaces to vlans as needed.
 
meant switch interface 0/19....had 27 on the brain for a different problem...sry.
 
While subinterfaces and trunking add more capabilities, your router will most definitely route between it primary and secondary IP addresses. If the router receives a packet destined for a network, it will will pass it wherever it thinks it should go. Even out the same interface. IF only the PIX was so friendly.
 
Firstly, apologieses to all who posted for delay in responding but have had difficulty finding time to follow up postings - especially as Easter Bank Holiday weekend (UK) got in the way.

Can confirm that trunking not possible with 2503 (your were right ibknelson), which is what I was first trying it with. Changed to simple hub and found I could routing between networks possible (again, you were right ibknelson as was wingatesl). Tried using 2620 and was able to set up trunking as advised (both jeter and cisconooblet were right).

Thanks to you all for the time and effort you put in to answer, it has helped me greatly. You should all have been awarded a star in gratitude.
 
Is this a 2503 router? If so, I always thought dot1q trunking won't work because you need a fastethernet port to do it."

Not on a 2503, but on a 2610 and 2611---those are ethernet (10Mbps) that will trunk. The thing is that you need full duplex comms, and after IOS 12.2 something, this was possible on the 2610 and 2611.

Burt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top