cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
924
Views
0
Helpful
2
Replies

Multiple IPs - same interface

adamtroxel
Level 1
Level 1

Can I assign multiple IP addresses to the same interface?

example _ I have about 5 /30 subnets that are plugged into a switch. Can I assign the gateway IP address for each of those subnets to my router so that it can the the gateway device for each subnet?

Or is there a smarter way to do this?

2 Replies 2

Richard Burts
Hall of Fame
Hall of Fame

Adam

It would help us to give better answers if we knew a bit more about your environment. But in general it is possible to configure a port on the switch as a trunk and to carry multiple VLANs over the trunk. Then you would configure the router interface to participate in the trunk, and would configure subinterfaces on the router interface, one subinterface per VLAN, and the IP address on the subinterface would be the gateway for the VLAN.

It might also be possible to configure multiple addresses on the router interface without using trunking by configuring a primary IP address and then a series of secondary addresses on the router interface.

HTH

Rick

HTH

Rick

bill.morton
Level 1
Level 1

You really want to avoid using 'ip address secondary' if possible. Make the interface into a trunk, then make your virtual subinterfaces such as fa0.1 fa0.2 fa0.3 etc and assign them an IP address. I'll post some example code in a second.

My example:

interface FastEthernet0/1

no ip address

no ip redirects

no ip proxy-arp

duplex auto

speed auto

no mop enabled

!

interface FastEthernet0/1.10

description Voice VLAN$FW_INSIDE$

encapsulation dot1Q 10

ip address 10.10.0.1 255.255.255.128

no ip redirects

no ip proxy-arp

ip nat inside

ip virtual-reassembly

!

interface FastEthernet0/1.20

description iSCSI VLAN$FW_INSIDE$

encapsulation dot1Q 20

ip address 10.20.0.1 255.255.255.128

no ip redirects

no ip proxy-arp

ip virtual-reassembly

Review Cisco Networking for a $25 gift card