Strange question - second subnet in my router

This is a discussion on Strange question - second subnet in my router within the Linux Networking forums, part of the Linux Forums category; Dear all, I have a pc with linux which play as router in my office. Here is my originally setting : ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-14-2006
rayray
 
Posts: n/a
Default Strange question - second subnet in my router

Dear all,

I have a pc with linux which play as router in my office.
Here is my originally setting :

192.168.1.x/24 --LAN-- (192.168.1.1 (PC-linux) 192.168.17.212) --WAN--

2 NIC in my PC-linux, one of them is eth0(192.168.1.1) as my lan gateway
and the other eth1(192.168.17.212) as my wan ip.All PCs in lan access
internet via PC-linux.
For some reason, I have to extend my PC-linux ability to handle the
second lan. And I use "ip addr" command to achieve this request. My
command is - ip addr add 192.168.111.111/24 dev eth0. I can attach 2nd
lan to eth0 successfully and it can access internet smoothly.
The question is that when PCs in 2nd lan try to access my PC-linux's WAN
IP(192.179.17.212), PC-linux always send these packets to WAN instead of
sending to 2nd lan.But my 1st lan(192.168.1.x) can access without any
problem. At first I think this may be a iptable or routed issue, but
after flush iptable and check routing table I still can't resolve this
problem.

My routing table is

# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
192.168.17.0 * 255.255.255.0 U 0 0 0 eth1
192.168.111.0 * 255.255.255.0 U 0 0 0 eth0
default 192.168.17.70 0.0.0.0 UG 0 0 0 eth1

My ip address list is

# ip addr l
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
6: eth1: <BROADCAST,NOTRAILERS,UP> mtu 1500 qdisc htb qlen 100
link/ether 00:04:ed:45:88:25 brd ff:ff:ff:ff:ff:ff
inet 192.168.17.212/24 brd 192.168.17.255 scope global eth1
inet 192.168.17.212/32 scope global eth1
7: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc htb qlen 100
link/ether 00:26:66:45:88:24 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.1/24 brd 192.168.1.255 scope global eth0
inet 192.168.111.111/24 scope global eth0


Any ideas??

Thanks..
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:51 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0