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

Subnetting/Configure

Status
Not open for further replies.

gp4

Technical User
Sep 27, 2002
30
AU
How do I configure subnetting on an interface.

I notice in some sample configs that while viewing IP route tables I see:
...
171.68.0.0/26 is subnetted, 3 subnets
...
as an example.

How do you enable/configure subnets?
 
you do not enable subnets as such. You have used VLSMs in your allocation of addresses for interfaces. So in the case you have given, you have 171.68.0.0/26, meaning that out of that block of addresses (i.e. the remaining 6 bits of the last octet) 3 subnets have been used so maybe you have 171.68.0.1/28, 171.68.0.17/28 and 171.68.0.33/28.

Think of it as the router automatically figuring out the aggregate of the contiguous addresses you have allocated.

If you take just the last octet (8 bit), with a /26 the first 2 (left to right) bits are not used by the subnets (in me example) but the 3rd and 4th bits are..
 
so the *REAL* question is, why are you using addresses from Cisco's address block!!!
 
Hi l3stuff,
Thanks for you reply however I still need further clarification on this.

Lets say I have a Class C address and I need to create subnets using the last 4 bits of the last octet i.e /28

How would I begin to configure this on a Cisco router?
i.e how does a cisco router know I need to subnet on an interface?
After configuring the IP address on an interface, would I need to then specify the static routes for each of the subnets that I need to use.

Also, what would I need to do to configure routing between subnets on this interface assuming I am only using static routes.

Thanks again.
 
As far as configuring this on a router that is done in config mode:

Router#config t
Router(config)#interface ethernet 2
Router(config-if)#ip address 192.168.10.1 255.255.255.240

That will configure IP subnet 192.168.10.0 on interface ethernet 2, of course if you are running IOS pre 12.0 you will have to use the ip subnet-zero global command to enable the use of a zero subnet. IOS 12 has this enabled by default.

IF you are running a routing protocol (RIP, IGRP, EIGRP, OSPF) then there is no need to add static routes.

As far as static routes and adding them for EACH subnet. That depends on how you have your addressing scheme, you can summerize your static routes with one statment (if they are in a CIDR block) thereby elimnating the need to add a statement for EACH subnet.

Todd VanDerwerken, CCNA, CCDA
Technical Consultant
 
How would I summarize the static routes with one statement?

Also is it possible to have multiple subnets connecting to a single ethernet interface on a Cisco 1700 router?

Thanks
 
as with all things, grouping addresses is a task accomplished with masks indicating how contiguous addresses are supernetted.

But that isn't what you are asking. ok, let us assume for some reason (which is a much more important question we should be asking ourselves), you decide to allocate a number of subnets to the same interface (this is called secondary addresses in IOS terms - ask Pierre Fortin ex Nortel, he asked for the feature in the very early '90s to help with a very broken network design)

a config such as (assuming you are in the interface level of the config editor)

ip address 1.1.1.1 255.255.255.0
ip address 1.1.2.1 255.255.255.0 secondary
ip address 1.1.3.1 255.255.255.0 secondary

would do this.

but why on earth would you do this??? You are on the same physical interface (I'm guessing a Broadcast/Multi Access media such as ethernet) Even though the packets are logically in separate broadcast domains you nullify this putting them on the same physical interface.

ok, let's assume you do this anyway.

assuming you have enables IP routing ("IP routing" global command), as connected interfaces they will be added to the forwarding table (prefixed with a "C" to indicate connected).

They will be auto summerized into something like
C 1.1.0.0 255.255.252.0 3 subnets
1.1.1.0 255.255.255.0
1.1.2.0 255.255.255.0
1.1.3.0 255.255.255.0

when you add these networks to your routing protocol configuration, it will be the summerized "aggregate" that is advertised.

If you just want devices on the 3 subnets to communicate you have done enough by enabling IP routing to get things talking together. A routing protocol is just the mail man, not the post office....

Anyway getting back to my other question to you, why are you using Cisco PUBLIC address space?????
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top