Computing.Net > Forums > Linux > Supernetting: Combining A-Class IP

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Supernetting: Combining A-Class IP

Reply to Message Icon

Name: m98yahya
Date: December 14, 2003 at 01:19:30 Pacific
OS: linux
CPU/Ram: i386
Comment:

Hi there,
I'm trying to setup a network containing:
a Sun server with private IP 192.1.1.1
several hosts with private IP 192.168.2.x
a hubswitch
a linux server as a gateway to the internet, with LAN iface IP 192.168.3.254 and WAN iface.

everything working except the hosts cannot ping to Sun Server. Can it be solved by modifying routing table in the linux gateway? I dont have more router to split the server from the hosts network.
The IP address of Sun Server cannot be changed because of that IP have been Hard-Coded into internal accounting system build by Software Department, and they dont want to modify their source.
Thanks in advance.



Sponsored Link
Ads by Google

Response Number 1
Name: JasonR
Date: December 14, 2003 at 14:34:06 Pacific
Reply:

Why would ANYBODY want to hardcode an IP
address? Even if the address does not change, one
day it might and I would want the ability to move the
system and not have to ask/tell another department
to FIX there code.


0

Response Number 2
Name: 3Dave
Date: December 15, 2003 at 04:27:54 Pacific
Reply:

They are going to have fun when IPv6 comes out!=o)

How about adding another NIC to the linux box and makingg it multi-homed?


0

Response Number 3
Name: m98yahya
Date: December 16, 2003 at 20:24:48 Pacific
Reply:

Hi guys, today I try to make the problem simple. I want to combine 172.25.123.x with 192.1.1.x
i use smoothwall pendolino for the linux box, using 2 NIC, configured as:
eth0: 172.25.123.234/24 broadcast at 172.25.123.255 (this is for LAN iface)
eth1: 172.26.123.234/24 broadcast at 172.26.123.255 (this iface is connected to ADSL modemrouter. my internet connection is ok)

now i try to make an alias for eth0 with ifconfig:
ifconfig eth0:1 192.1.1.234 netmask 255.255.255.0 broadcast 192.1.1.255

my ifconfig show:

[root@smoothwall root]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:04:76:8D:7F:C0
inet addr:172.25.123.234 Bcast:172.25.123.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:565340 errors:0 dropped:0 overruns:1 frame:0
TX packets:173947 errors:0 dropped:0 overruns:0 carrier:6
collisions:151 txqueuelen:100
RX bytes:62145247 (59.2 Mb) TX bytes:172310064 (164.3 Mb)
Interrupt:5 Base address:0x7400

eth0:1 Link encap:Ethernet HWaddr 00:04:76:8D:7F:C0
inet addr:192.1.1.234 Bcast:192.1.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:5 Base address:0x7400

eth1 Link encap:Ethernet HWaddr 00:40:05:10:69:2C
inet addr:172.26.123.254 Bcast:172.26.123.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:168957 errors:0 dropped:0 overruns:0 frame:0
TX packets:540111 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:169192024 (161.3 Mb) TX bytes:59181830 (56.4 Mb)
Interrupt:10 Base address:0x7000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:166 errors:0 dropped:0 overruns:0 frame:0
TX packets:166 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:23034 (22.4 Kb) TX bytes:23034 (22.4 Kb)


my route show:

[root@smoothwall root]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.25.123.0 * 255.255.255.0 U 0 0 0 eth0
192.1.1.0 * 255.255.255.0 U 0 0 0 eth0
172.26.123.0 * 255.255.255.0 U 0 0 0 eth1
default 172.26.123.234 0.0.0.0 UG 0 0 0 eth1


the 192.1.1.0 line have been added automatically.

as u see, my ifconfig print eth0:1 for 192.1.1.234, but in my route, it say 192.1.1.0 is using eth0.
-now i can ping to 192.1.1.x. from linux box.
-host using 192.1.1.x (which gateway is set to 192.1.1.234) can ping to linux box, can access internet but cannot ping to 172.25.123.x

my sysctl net.ipv4.ip_forward show:
net.ipv4.ip_forward=1

help me please.



0

Response Number 4
Name: 3Dave
Date: December 17, 2003 at 01:51:08 Pacific
Reply:

The 192.1.1.0 with a subnet of 255.255.255.0 just means any traffic for 192.1.1.1 to 192.1.1.254 will be routed through eth0


0

Response Number 5
Name: Rick
Date: December 17, 2003 at 11:23:18 Pacific
Reply:

try posting in the networking forum, or get a good book detailing basic networking. you need some refreshing on the basics of subnets.


0

Related Posts

See More



Response Number 6
Name: m98yahya
Date: December 17, 2003 at 17:29:40 Pacific
Reply:

thanks rick, i think i come to wrong forums.


0

Sponsored Link
Ads by Google
Reply to Message Icon

message error when bootin... Installing programs on Li...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: Supernetting: Combining A-Class IP

Need to FTP throug a Linux on to a local IP www.computing.net/answers/linux/need-to-ftp-throug-a-linux-on-to-a-local-ip/1975.html

how do you asign a fixed ip on linux 7.2 www.computing.net/answers/linux/how-do-you-asign-a-fixed-ip-on-linux-72/8487.html

installing a nic card www.computing.net/answers/linux/installing-a-nic-card/19311.html