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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple IP's on ethernet port

Status
Not open for further replies.

RadioX

IS-IT--Management
May 15, 2001
145
US
Can I asssign multiple Ip's to an ethernet port on my 3640 router.

I have say 10.0.0.1 and I also want to add 10.1.2.1.

Basically I have three class C's and want to be able to route them on this router with this one ethernet port.

Is this possible???

Thanks
Ron
 
Yes as far as know you can use sub-interfaces. but I cant find any info on this. I seem to remember you set the new interface with conf t/int e0.1 this sets up a subinterface on e0. you can then setup e0.2, e0.3 etc.
 
Thats exactly right. You can then treat each sub-interface as if it is a physical device from the point of view of configuring IP addresses etc.
 
Multiple Interface Addresses
The software supports multiple IP addresses per interface. In addition to the primary address specified by the ip address interface subcommand, an unlimited number of secondary addresses may be specified by adding the optional keyword secondary, as shown:

ip address address mask [secondary]
Example:
In the example below, 131.108.1.27 is the primary address and 192.31.7.17 is a secondary address for Ethernet 0.

interface ethernet 0
ip address 131.108.1.27 255.255.255.0
ip address 192.31.7.17 255.255.255.0 secondary

Secondary addresses are treated like primary addresses, except that the system never generates datagrams other than routing updates with secondary source addresses. IP broadcasts and ARP requests are handled properly, as are interface routes in the IP routing table.

Secondary IP addresses can be used in a variety of situations. The following are the most common applications:


There may not be enough host addresses for a particular network segment. For example, your subnetting allows up to 254 hosts per logical subnet, but on one physical subnet you need to have 300 host addresses. Using secondary IP addresses on the routers allows you to have two logical subnets using one physical subnet.


Many older networks were built using Level 2 bridges. The judicious use of secondary addresses can aid in the transition to a subnetted, router-based network. Routers on an older, bridged segment can be easily made aware that there are many subnets on that segment.


Two subnets of a single network might otherwise be separated by another network. This situation not permitted when subnets are in use. In these instances, the first network is extended, or layered on top of the second network using secondary addresses.


--------------------------------------------------------------------------------
Note If any router on a network segment uses a secondary address, all other routers on that same segment must also use a secondary address from the same network or subnet. An inconsistent use of secondary addresses on a network segment can very quickly lead to routing loops.
 
ok so let me run a sample config by you guys before I throw this on a production router and wack everything out :)

interface FastEthernet0/0
ip address 10.0.0.1
subnetmask 255.255.255.0

interface fastethernet0/0.1
ip address 10.1.2.3
subnet mask 255.255.255.240

will this work? :)

Thanks for all your help bobthecat and trevorh13
 
I find using secondary interfaces better on ethernet port then subinterfaces which i use serial ports. Why are you using a 255.255.255.240 mask? With that mask your limited to only 14 hosts. How many hosts do you plan on having on a segment?
 
I am using the 240 subnet mask because we are taking one of our Class C's and breaking it down. Basically I am providing internet access to some people upstairs in my building so I am goig to put a switch in there office and just run a corssover from switch to switch. But they want some ips so they can do some small hosting (mail server, small website, etc) so I dont want to give them address from the class C that I am using to hos t my stuff so I subnetted a class so if I do this again for another companyI can give them a small segment of address etc etc.

Does this make sense or am I possibly going about it the wrong way???

Thanks for all your help
Ron
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top