FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 01-11-2008, 12:36 AM
Holla
 
Default Routing problem ?

Hi,
I think I have a routing problem with network
shown below (hope my ascii art survives)

From PC2, I cannot ping 192.168.1.1 and no internet.
Also cannot ping ISP's DNS servers. But there is full
connectivity between PC1 and PC2.

At PC2,
# traceroute 192.168.1.1
traceroute to 192.168.1.1 (192.168.1.1), 30 hops max, 40 byte packets
1 * * *
2 * * *

I reached upto this point by following up the
gentoo howtos, but now stuck. Any pointers ?

thanks
sathish




192.168.1.1
+-+ +------------+
| |-----------| Router1 |=========ASDL conn
| | +------------+
| |
| |
| |
| | 192.168.1.23 +-------+ 192.168.2.43
| |------------------| PC1 |----))).............
+-+ +-------+ .
.
Passive Hub .
192.168.2.1 .
+------------+ .
| Router2 |--)))..
+------------+
|
|
+------+
| PC2 |
+------+
192.168.2.24

--------------------------------------------------------------
Router1 (UTSStarCom ISP supplied) :
- router IP 192.168.1.1
- wireless enabled but not used

--------------------------------------------------------------
PC1: (gentoo)

- eth0 (192.168.1.23) and wireless (192.168.2.43)
- no iptables configuration
- routing table entries
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.0 * 255.255.255.0 U 0 0 0 ra0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
default 192.168.1.1 0.0.0.0 UG 0 0 0 eth0


# echo "1" > /proc/sys/net/ipv4/ip_forward


# Kernel Networking options
#
CONFIG_UNIX=y
CONFIG_XFRM=y
CONFIG_INET=y
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_ASK_IP_FIB_HASH=y
CONFIG_IP_FIB_HASH=y
CONFIG_IP_ROUTE_VERBOSE=y
CONFIG_INET_XFRM_MODE_TRANSPORT=y
CONFIG_INET_XFRM_MODE_TUNNEL=y
CONFIG_INET_XFRM_MODE_TRANSPORT=y
CONFIG_INET_XFRM_MODE_TUNNEL=y
CONFIG_TCP_CONG_BIC=y
--------------------------------------------------------------

Router2 (WRT54GL)
- router IP 192.168.2.1
- wireless enabled and used
--------------------------------------------------------------
PC2 (gentoo)
- static IP address 192.168.2.24
- routing table entries

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.43 * 255.255.255.255 UH 0 0 0 eth0
192.168.2.0 * 255.255.255.0 U 0 0 0 eth0
192.168.1.0 192.168.2.43 255.255.255.0 UG 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
default 192.168.2.43 0.0.0.0 UG 0 0 0 eth0
--
gentoo-user@lists.gentoo.org mailing list
 
Old 01-11-2008, 02:14 AM
kashani
 
Default Routing problem ?

Holla wrote:

192.168.1.1
+-+ +------------+
| |-----------| Router1 |=========ASDL conn
| | +------------+
| |
| |
| |
| | 192.168.1.23 +-------+ 192.168.2.43
| |------------------| PC1 |----))).............
+-+ +-------+ .
.
Passive Hub .
192.168.2.1 .
+------------+ .
| Router2 |--)))..
+------------+
|
|
+------+
| PC2 |
+------+
192.168.2.24


Yep it's a routing problem.

Router1 needs a route to point back to PC2 so when traffic bound for it
comes it, it'll know what to do with it.

route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.1.23

kashani

--
gentoo-user@lists.gentoo.org mailing list
 
Old 01-11-2008, 03:52 AM
"Mike Mazur"
 
Default Routing problem ?

Hi,

On Jan 11, 2008 12:14 PM, kashani <kashani-list@badapple.net> wrote:
> Holla wrote:
> > 192.168.1.1
> > +-+ +------------+
> > | |-----------| Router1 |=========ASDL conn
> > | | +------------+
> > | |
> > | |
> > | |
> > | | 192.168.1.23 +-------+ 192.168.2.43
> > | |------------------| PC1 |----))).............
> > +-+ +-------+ .
> > .
> > Passive Hub .
> > 192.168.2.1 .
> > +------------+ .
> > | Router2 |--)))..
> > +------------+
> > |
> > |
> > +------+
> > | PC2 |
> > +------+
> > 192.168.2.24
>
> Yep it's a routing problem.
>
> Router1 needs a route to point back to PC2 so when traffic bound for it
> comes it, it'll know what to do with it.
> route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.1.23

Also if you want PC2 to access the net, you would need PC1 to be smart
enough to route/NAT packets from PC2 to Router 1.

Mike
--
gentoo-user@lists.gentoo.org mailing list
 
Old 01-11-2008, 01:39 PM
YoYo Siska
 
Default Routing problem ?

Holla wrote:
> Hi,
> I think I have a routing problem with network
> shown below (hope my ascii art survives)
>
> From PC2, I cannot ping 192.168.1.1 and no internet.
> Also cannot ping ISP's DNS servers. But there is full
> connectivity between PC1 and PC2.
>
> At PC2,
> # traceroute 192.168.1.1
> traceroute to 192.168.1.1 (192.168.1.1), 30 hops max, 40 byte packets
> 1 * * *
> 2 * * *
>
> I reached upto this point by following up the
> gentoo howtos, but now stuck. Any pointers ?

as someone other said, you should setup NAT, there should be enough
information on the wiki, but basically
iptabales -t nat -A POSTROUTING -o eth0 -s 192.168.2.0/24 -j MASQUERADE
on PC1 should do it, but there might be better ways
(note that you need some iptables stuff in the kernel)

one other thing, if nat doesn't work, some wireless aps (i'm thinking
about the 192.168.2.1) need to have correctly set up default gateway
etc... they sometimes try to be to smart and I had sometimes problems
when the router was connected as a wireless client to them...

btw, why don't you use the wireless on the ROUTER1 (doesn't seem you
want to do any firewalling on the PC1)? It might make things much
simpler... you could setup the other ap to connect to it in client mode
and all your network could then be on the 192.168.1.0/24 and I would
gues that your provider NATs the whole subnet...


yoyo


>
>
> 192.168.1.1
> +-+ +------------+
> | |-----------| Router1 |=========ASDL conn
> | | +------------+
> | |
> | |
> | |
> | | 192.168.1.23 +-------+ 192.168.2.43
> | |------------------| PC1 |----))).............
> +-+ +-------+ .
> .
> Passive Hub .
> 192.168.2.1 .
> +------------+ .
> | Router2 |--)))..
> +------------+
> |
> |
> +------+
> | PC2 |
> +------+
> 192.168.2.24
>
> --------------------------------------------------------------
> Router1 (UTSStarCom ISP supplied) :
> - router IP 192.168.1.1
> - wireless enabled but not used
>
> --------------------------------------------------------------
> PC1: (gentoo)
>
> - eth0 (192.168.1.23) and wireless (192.168.2.43)
> - no iptables configuration
> - routing table entries
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use Iface
> 192.168.2.0 * 255.255.255.0 U 0 0 0 ra0
> 192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
> loopback * 255.0.0.0 U 0 0 0 lo
> default 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
>
>
> # echo "1" > /proc/sys/net/ipv4/ip_forward
>
>
> # Kernel Networking options
> #
> CONFIG_UNIX=y
> CONFIG_XFRM=y
> CONFIG_INET=y
> CONFIG_IP_ADVANCED_ROUTER=y
> CONFIG_ASK_IP_FIB_HASH=y
> CONFIG_IP_FIB_HASH=y
> CONFIG_IP_ROUTE_VERBOSE=y
> CONFIG_INET_XFRM_MODE_TRANSPORT=y
> CONFIG_INET_XFRM_MODE_TUNNEL=y
> CONFIG_INET_XFRM_MODE_TRANSPORT=y
> CONFIG_INET_XFRM_MODE_TUNNEL=y
> CONFIG_TCP_CONG_BIC=y
> --------------------------------------------------------------
>
> Router2 (WRT54GL)
> - router IP 192.168.2.1
> - wireless enabled and used
> --------------------------------------------------------------
> PC2 (gentoo)
> - static IP address 192.168.2.24
> - routing table entries
>
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use Iface
> 192.168.2.43 * 255.255.255.255 UH 0 0 0 eth0
> 192.168.2.0 * 255.255.255.0 U 0 0 0 eth0
> 192.168.1.0 192.168.2.43 255.255.255.0 UG 0 0 0 eth0
> loopback * 255.0.0.0 U 0 0 0 lo
> default 192.168.2.43 0.0.0.0 UG 0 0 0 eth0


--
gentoo-user@lists.gentoo.org mailing list
 
Old 01-11-2008, 02:15 PM
Holla
 
Default Routing problem ?

On Jan 11, 2008 8:44 AM, kashani <kashani-list@badapple.net> wrote:
> Holla wrote:
> > 192.168.1.1
> > +-+ +------------+
> > | |-----------| Router1 |=========ASDL conn
> > | | +------------+
> > | |
> > | |
> > | |
> > | | 192.168.1.23 +-------+ 192.168.2.43
> > | |------------------| PC1 |----))).............
> > +-+ +-------+ .
> > .
> > Passive Hub .
> > 192.168.2.1 .
> > +------------+ .
> > | Router2 |--)))..
> > +------------+
> > |
> > |
> > +------+
> > | PC2 |
> > +------+
> > 192.168.2.24
>
> Yep it's a routing problem.
>
> Router1 needs a route to point back to PC2 so when traffic bound for it
> comes it, it'll know what to do with it.
> route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.1.23
>

Thanks, I added this route at the Router1 and now can ping 192.168.1.1
at PC2. But still can't ping DNS server from PC2.

At PC2
# traceroute 218.248.240.46 (ISP's DNS server)
traceroute to 218.248.240.46 (218.248.240.46), 30 hops max, 40 byte packets
1 192.168.2.43 (192.168.2.43) 1.730 ms 0.840 ms 0.920 ms
2 192.168.1.1 (192.168.1.1) 1.440 ms 1.469 ms 1.287 ms
3 * * *
4 * * *

At PC1

# traceroute 218.248.240.46
traceroute to 218.248.240.46 (218.248.240.46), 30 hops max, 40 byte packets
1 192.168.1.1 (192.168.1.1) 0.848 ms 0.706 ms 0.681 ms
2 117.192.128.1 (117.192.128.1) 19.712 ms 18.878 ms 19.920 ms
3 218.248.160.134 (218.248.160.134) 19.292 ms 19.796 ms 19.190 ms


Any idea why this is so ?

sathish

> kashani
>
> --
> gentoo-user@lists.gentoo.org mailing list
>
>
--
gentoo-user@lists.gentoo.org mailing list
 
Old 01-11-2008, 02:18 PM
Holla
 
Default Routing problem ?

On Jan 11, 2008 10:22 AM, Mike Mazur <mmazur@gmail.com> wrote:
> Hi,
>
>
> On Jan 11, 2008 12:14 PM, kashani <kashani-list@badapple.net> wrote:
> > Holla wrote:
> > > 192.168.1.1
> > > +-+ +------------+
> > > | |-----------| Router1 |=========ASDL conn
> > > | | +------------+
> > > | |
> > > | |
> > > | |
> > > | | 192.168.1.23 +-------+ 192.168.2.43
> > > | |------------------| PC1 |----))).............
> > > +-+ +-------+ .
> > > .
> > > Passive Hub .
> > > 192.168.2.1 .
> > > +------------+ .
> > > | Router2 |--)))..
> > > +------------+
> > > |
> > > |
> > > +------+
> > > | PC2 |
> > > +------+
> > > 192.168.2.24
> >
> > Yep it's a routing problem.
> >
> > Router1 needs a route to point back to PC2 so when traffic bound for it
> > comes it, it'll know what to do with it.
> > route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.1.23
>
> Also if you want PC2 to access the net, you would need PC1 to be smart
> enough to route/NAT packets from PC2 to Router 1.

Thanks, but I only have a very limited understanding of this matter.
Does this mean I had to add netfilter to the kernel and configure
iptables ?

sathish





> Mike
>
> --
> gentoo-user@lists.gentoo.org mailing list
>
>
--
gentoo-user@lists.gentoo.org mailing list
 
Old 01-11-2008, 03:20 PM
Holla
 
Default Routing problem ?

On Jan 11, 2008 8:09 PM, YoYo Siska <yoyo@gl.ksp.sk> wrote:

> one other thing, if nat doesn't work, some wireless aps (i'm thinking
> about the 192.168.2.1) need to have correctly set up default gateway
> etc... they sometimes try to be to smart and I had sometimes problems
> when the router was connected as a wireless client to them...

Can you give some clues about what you mean by correctly setup gw ?

>
> btw, why don't you use the wireless on the ROUTER1 (doesn't seem you
> want to do any firewalling on the PC1)? It might make things much
> simpler... you could setup the other ap to connect to it in client mode
> and all your network could then be on the 192.168.1.0/24 and I would
> gues that your provider NATs the whole subnet...

Router1 is temporary. My ISP will shortly replace it with
a non-wireless version. So I want configure this way.

sathish


>
>
> yoyo
>
>
>
> >
> >
> > 192.168.1.1
> > +-+ +------------+
> > | |-----------| Router1 |=========ASDL conn
> > | | +------------+
> > | |
> > | |
> > | |
> > | | 192.168.1.23 +-------+ 192.168.2.43
> > | |------------------| PC1 |----))).............
> > +-+ +-------+ .
> > .
> > Passive Hub .
> > 192.168.2.1 .
> > +------------+ .
> > | Router2 |--)))..
> > +------------+
> > |
> > |
> > +------+
> > | PC2 |
> > +------+
> > 192.168.2.24
> >
> > --------------------------------------------------------------
> > Router1 (UTSStarCom ISP supplied) :
> > - router IP 192.168.1.1
> > - wireless enabled but not used
> >
> > --------------------------------------------------------------
> > PC1: (gentoo)
> >
> > - eth0 (192.168.1.23) and wireless (192.168.2.43)
> > - no iptables configuration
> > - routing table entries
> > Kernel IP routing table
> > Destination Gateway Genmask Flags Metric Ref Use Iface
> > 192.168.2.0 * 255.255.255.0 U 0 0 0 ra0
> > 192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
> > loopback * 255.0.0.0 U 0 0 0 lo
> > default 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
> >
> >
> > # echo "1" > /proc/sys/net/ipv4/ip_forward
> >
> >
> > # Kernel Networking options
> > #
> > CONFIG_UNIX=y
> > CONFIG_XFRM=y
> > CONFIG_INET=y
> > CONFIG_IP_ADVANCED_ROUTER=y
> > CONFIG_ASK_IP_FIB_HASH=y
> > CONFIG_IP_FIB_HASH=y
> > CONFIG_IP_ROUTE_VERBOSE=y
> > CONFIG_INET_XFRM_MODE_TRANSPORT=y
> > CONFIG_INET_XFRM_MODE_TUNNEL=y
> > CONFIG_INET_XFRM_MODE_TRANSPORT=y
> > CONFIG_INET_XFRM_MODE_TUNNEL=y
> > CONFIG_TCP_CONG_BIC=y
> > --------------------------------------------------------------
> >
> > Router2 (WRT54GL)
> > - router IP 192.168.2.1
> > - wireless enabled and used
> > --------------------------------------------------------------
> > PC2 (gentoo)
> > - static IP address 192.168.2.24
> > - routing table entries
> >
> > Kernel IP routing table
> > Destination Gateway Genmask Flags Metric Ref Use Iface
> > 192.168.2.43 * 255.255.255.255 UH 0 0 0 eth0
> > 192.168.2.0 * 255.255.255.0 U 0 0 0 eth0
> > 192.168.1.0 192.168.2.43 255.255.255.0 UG 0 0 0 eth0
> > loopback * 255.0.0.0 U 0 0 0 lo
> > default 192.168.2.43 0.0.0.0 UG 0 0 0 eth0
>
>
>
> --
> gentoo-user@lists.gentoo.org mailing list
>
>
--
gentoo-user@lists.gentoo.org mailing list
 
Old 01-11-2008, 04:14 PM
Richard Torres
 
Default Routing problem ?

I don't understand why 2 routers. Maybe I'm missing something. Unless you have 2 networks* that need to be separate only one is needed. If you have a wireless router, use it as a wireless access point and not a router. Which means turn off DHCP on the wireless router and don't configure or use the WAN connection.
Depending on the capabilities of the router you can connect a LAN port on Router2 to your ADSL (Router1) router and assign an IP address that's in the same network as Router1.


----- Original Message ----
From: Holla <holla.net@gmail.com>
To: gentoo-user@lists.gentoo.org
Sent: Friday, January 11, 2008 8:18:37
AM
Subject: Re: [gentoo-user] Routing problem ?


On Jan 11, 2008 10:22 AM, Mike Mazur <mmazur@gmail.com> wrote:
> Hi,
>
>
> On Jan 11, 2008 12:14 PM, kashani <kashani-list@badapple.net> wrote:
> > Holla wrote:
> > >* * * * * * * * 192.168.1.1
> > > +-+* * * * * +------------+
> > > | |-----------|* Router1* |=========ASDL conn
> > > | |* * * * * +------------+
> > > | |
> > > | |
> > > | |
> > > | |* * 192.168.1.23* +-------+* 192.168.2.43
> > > | |------------------|* PC1* |----))).............
> > > +-+* * * * * *
* * * +-------+* * * * * * * * * .
> > >* * * * * * * * * * * * * * * * * * * * * * * * * .
> > > Passive Hub* * * * * * * * * * * * * * * * * * * .
> > >* * * * * * * * * * * * * * * 192.168.2.1* * * * .
> > >* * * * * * * * * * * * * * * +------------+* * * .
> > >* * * * * * * * * * * * * * * | Router2* * |--)))..
> > >* *
* * * * * * * * * * * * * +------------+
> > >* * * * * * * * * * * * * * * * |
> > >* * * * * * * * * * * * * * * * |
> > >* * * * * * * * * * * * * * * +------+
> > >* * * * * * * * * * * * * * * | PC2* |
> > >* * * * * * * * * * * * * * * +------+
> > >* * * * * * * * * * * * * * * 192.168.2.24
> >
> > Yep it's a routing problem.
>
>
> > Router1 needs a route to point back to PC2 so when traffic bound
for it
> > comes it, it'll know what to do with it.
> > route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.1.23
>
> Also if you want PC2 to access the net, you would need PC1 to be
smart
> enough to route/NAT packets from PC2 to Router 1.

Thanks, but I only have a very limited understanding of this matter.
Does this mean I had to add netfilter to the kernel and configure
iptables ?

sathish





> Mike
>
> --
> gentoo-user@lists.gentoo.org mailing list
>
>
--
gentoo-user@lists.gentoo.org mailing list
 
Old 01-11-2008, 04:50 PM
 
Default Routing problem ?

Holla <holla.net@gmail.com> writes:

> On Jan 11, 2008 8:09 PM, YoYo Siska <yoyo@gl.ksp.sk> wrote:
>
>> one other thing, if nat doesn't work, some wireless aps (i'm thinking
>> about the 192.168.2.1) need to have correctly set up default gateway
>> etc... they sometimes try to be to smart and I had sometimes problems
>> when the router was connected as a wireless client to them...
>
> Can you give some clues about what you mean by correctly setup gw ?

Hey guys... it would help if you trim your posts so there isn't so
much in each message.

By correct gateway I think in this case it would be the inward facing
address of pc1 (192.168.2.43) so on router2 you would set the gw to
that address.
And on pc2 the gw would be 192.168.2.1. That is unless router2 is
just a WAP (wireless access point).

But I'm not sure I understand all of this. It might be good to
include the make of the routers (even model number might matter).

Excuse me if this info is already in these monster size messages
somewhere but:
If you redo the diagram please include this information:
make and model of router2
What OS is running on pc1 and pc2

Annotate in one line what gateways are set at the various points.

The adsl router make and model may not matter too much.


--
gentoo-user@lists.gentoo.org mailing list
 
Old 01-11-2008, 04:54 PM
 
Default Routing problem ?

Richard Torres <rtorres827@yahoo.com> writes:

> I don't understand why 2 routers. Maybe I'm missing something. Unless
> you have 2 networks that need to be separate only one is needed. If
> you have a wireless router, use it as a wireless access point and not
> a router. Which means turn off DHCP on the wireless router and don't
> configure or use the WAN connection. Depending on the capabilities of
> the router you can connect a LAN port on Router2 to your ADSL
> (Router1) router and assign an IP address that's in the same network
> as Router1.

I agree, but Richard, (and this is just a request from a confused
participant) please take a moment to pare down your reply and then
insert your message where it makes some sense, don't just blob it on
top and further confuse things.

--
gentoo-user@lists.gentoo.org mailing list
 

Thread Tools




All times are GMT. The time now is 06:46 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org