Discussion Locked

cisco "ip classless" and linux

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

hi all ,

i have to connect a linux server
(62.xxx.xxx.xxx/24) to a cisco router .

the router is only using static routes with the "ip classless" command .
router interface eth0/0 is using address
194.xxx.xxx.xxx/27 and some class c
networks ( 62.xxx.xxx.xxx ) are connected
to this interface .

Which is the default gateway for the linux
server ?
( i think i can't use the router interface 194.xxx.xxx.xxx as gateway , because it's out of the server address range 62.xxx.xxx.xxx/24 )

Could linux also provide a command like
"ip classless" used by cisco ?

Maybe someone can help me . I'm a linux
newbie and i have only experience with cisco
routers .

regards
Stefan

1 reply

by jim-h

Stefan,

I think I am a little confused by your question. You said that you have a Cisco Router interface e0/0 with IP address 194.x.x.x.x/27 and some Class ?C? 62.x.x.x/24 Networks attached to it as well. Are you using secondary addresses?

You want to know what the default gateway of the Linux box should be having one of the 62.x.x.x/24 address. Since you said that the E0/0 had other 62.x.x.x/4 networks attached and you are not indicating any other layer 3 devices in between then E0/0 should have some secondary addresses in the configuration and the Linux box can default to a hard coded secondary address.

As far as the Cisco ?IP Classless? command goes I am confused why this would benefit you in this case to be on a Linux box. IP Classless just tells the Cisco router not to treat addresses as their natural class. Are you simply saying that you want to put a subnet mask other than the ?natural class? on the Linux box? Is this maybe what you are looking for? When you configure a mask other than the natural class you have essentially already done a classless setup. Cisco used to have a default that put ?no ip classless? in their routers and they did make the effort to change that as soon as possible in the later revs of code.

In Linux you may want to read the man pages for ?ifconfig?.
#/sbin/ifconfig eth0 x.x.x.x netmask x.x.x.x up

You may also want to look t this example editing the standard system binaries to control the IP address and netmask. http://lppcfom.sourceforge.net/fom-serve/cache/1045.html

Let me know how it goes and if I can help any further,
Jim

This discussion is closed to new replies.