Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Confusion in Configuring Networks
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Fred Krogh
Veteran
Veteran


Joined: 07 Feb 2005
Posts: 1036
Location: Tujunga, CA

PostPosted: Sat Dec 06, 2014 4:01 pm    Post subject: Confusion in Configuring Networks Reply with quote

My primary computer has:
eth0 is for the outside world.
eth1 is a local wired network at 192.168.0.3
eth2 is connected to a wireless router at 192.168.2.3

A laptop connected to the wireless network can view the router at 191.168.1.1, and can access other stuff on 191.168.1.*

My primary computer can not see anything on the wireless network. I'm guessing that I don't have things set up correctly in /etc/conf.d/net, but I'm not clear on what must be said there to access stuff on the wireless network. Any suggestions there are elsewhere most welcome. Thanks,
Fred
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54236
Location: 56N 3W

PostPosted: Sat Dec 06, 2014 4:09 pm    Post subject: Reply with quote

Fred Krogh,

We need more info.

Please post
Code:
ifconfig -a
and
Code:
route -n

I guess you have a static route missing either on your router or your primary computer.

I normally set it up the other way round. Wired can get anywhere but wireless cannot get to wired.
Assume your wireless is wide open, it might as well be since any determined attacker can get in.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Fred Krogh
Veteran
Veteran


Joined: 07 Feb 2005
Posts: 1036
Location: Tujunga, CA

PostPosted: Sat Dec 06, 2014 4:18 pm    Post subject: Reply with quote

Quote:
ifconfig -a
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 216.86.203.11 netmask 255.255.255.0 broadcast 216.86.203.11
inet6 fe80::2e0:4cff:fe68:e40c prefixlen 64 scopeid 0x20<link>
ether 00:e0:4c:68:e4:0c txqueuelen 1000 (Ethernet)
RX packets 8019131 bytes 7292651974 (6.7 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 6417559 bytes 1333769594 (1.2 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.3 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::2e0:4cff:fe68:e512 prefixlen 64 scopeid 0x20<link>
ether 00:e0:4c:68:e5:12 txqueuelen 1000 (Ethernet)
RX packets 962906 bytes 113741223 (108.4 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1443035 bytes 1718641344 (1.6 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

eth2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.2.3 netmask 255.255.255.0 broadcast 192.168.2.255
inet6 fe80::2e0:4cff:fe68:e40d prefixlen 64 scopeid 0x20<link>
ether 00:e0:4c:68:e4:0d txqueuelen 1000 (Ethernet)
RX packets 29764 bytes 2985193 (2.8 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 39027 bytes 43755948 (41.7 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

eth3: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether 00:e0:4c:68:e5:11 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

eth4: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether f4:6d:04:d6:7d:15 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 144209 bytes 496236007 (473.2 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 144209 bytes 496236007 (473.2 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

sit0: flags=128<NOARP> mtu 1480
sit txqueuelen 0 (IPv6-in-IPv4)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Quote:
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 216.86.203.1 0.0.0.0 UG 2 0 0 eth0
0.0.0.0 192.168.2.1 0.0.0.0 UG 4 0 0 eth2
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
127.0.0.0 127.0.0.1 255.0.0.0 UG 0 0 0 lo
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
216.86.203.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0

I originally had the wireless connected to the outside world, but then things on my local wired network could not get to the outside world, probably because of my problems configuring the wireless router or something else. If I can't make things work the way I have them maybe I could manage to get it all to work through the wireless?? Thanks.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54236
Location: 56N 3W

PostPosted: Sat Dec 06, 2014 4:30 pm    Post subject: Reply with quote

Fred Krogh,

From your orinial post.
Quote:
eth2 is connected to a wireless router at 192.168.2.3

ifconfig -a:
eth2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.2.3 netmask 255.255.255.0 broadcast 192.168.2.255


Together those quotes says your PC has 192.168.2.3 and so does your WAP.
That can't work.

The AP will nomally be a transparent bridge. It only has an IP so you can control it.
The AP is not a gateway. Its good enough to send packets destined for wireless hosts to eth2 but eth2, the AP and the wireless hosts all need unique IPs in the 192.168.2..0/24 subnet.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Sat Dec 06, 2014 4:36 pm    Post subject: Reply with quote

Any reason why the wireless is on a different subnet?

I run wired and wireless on the same subnet. I even give each wired and wireless interface the same IP address and dhcpcd works its magic and moves it to the most desired interface.
The benefit is that I can remotely connect to it regardless of how it's connected.

Anyway, in direct answer to your question you need to have a router between the wired and wireless which knows about both networks.
If you don't have this then just run them both on the same subnet.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
Fred Krogh
Veteran
Veteran


Joined: 07 Feb 2005
Posts: 1036
Location: Tujunga, CA

PostPosted: Sat Dec 06, 2014 4:44 pm    Post subject: Reply with quote

I had just recently set
Quote:
routes_eth2="default via 192.168.2.3"
in /etc/conf.d/net in a hope that that would change things which weren't working. I guess that made things fail in a slightly different way, and I have removed that line.

I think that AP is a abbreviation for access point. Does wireless hosts refer to everything on the wireless network?

I have eth1 going to a router, does that mean I should connect the wireless device to a line from the router. But then what is the gateway that I put on the router. I'm afraid I'm still a bit confused. I do appreciate the help. Thanks.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Sat Dec 06, 2014 5:30 pm    Post subject: Reply with quote

Fred Krogh wrote:
I think that AP is a abbreviation for access point. Does wireless hosts refer to everything on the wireless network?


Yes

Quote:
I have eth1 going to a router, does that mean I should connect the wireless device to a line from the router. But then what is the gateway that I put on the router. I'm afraid I'm still a bit confused. I do appreciate the help. Thanks.


So on the router you should have 3 physical ports - eth0, eth1 and eth2.
eth0 plugs into the internet
eth1 plugs into the wireless Access Point
eth2 plugs into the wired network (could be a cable to a switch or wired hub for example)

eth0 ISP assigned address
eth1 192.168.2.1/24
eth2 192.168.0.1/24

On the router you need to have the default route going via eth0

On the wired clients connected to this router they need a default route to 192.168.0.1
On the wireless clients connected to this router they need a default route to 192.168.2.1
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
Fred Krogh
Veteran
Veteran


Joined: 07 Feb 2005
Posts: 1036
Location: Tujunga, CA

PostPosted: Sat Dec 06, 2014 5:43 pm    Post subject: Reply with quote

I'm sorry, but I think I've been misleading you through confusing switch and router. My main machine is serving as a router. It is connected to the outside world (eth0) and connects to a switch (eth1) that connect to a bunch of different machine. It also connects to the wireless box (eth2).

Anyway from what you suggested, I think there is a chance that I can get this all to work. To minmize things that need to change, I'll change eth2 to 192.168.1.1/24. The router now things it is at 192.168.2.3, and I'll change that to 192.168.1.1. If I understand what was suggested that should be the only changes I need. I'll post later on how this all works out. Thanks.
Back to top
View user's profile Send private message
Fred Krogh
Veteran
Veteran


Joined: 07 Feb 2005
Posts: 1036
Location: Tujunga, CA

PostPosted: Sat Dec 06, 2014 7:03 pm    Post subject: Reply with quote

I'm not getting there. In changing things I have no wireless at all. I've done a hard reset of the wireless modem, which allegedly sets its ip address to 192.168.1.1. The documentation says that my pc and the router must be on the same subnet. So I'm guessing that this is the problem. Among other things, in /etc/cond.d/net, I have
Quote:
config_eth1="192.168.0.3 netmask 255.255.255.0 broadcast 192.168.0.255"
config_eth2="192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255"
config_192168001001="192.168.1.2/24"
That last line was more a guess than anything. But whether I leave it in or get it out, it does not work. I'm hoping there is something I can put in /etc/cond.d/net that will get both machines on the same network, or any idea that will let me access the wireless router. Currently ifconfig and route give:#
Quote:
ifconfig -a
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 216.86.203.11 netmask 255.255.255.0 broadcast 216.86.203.11
inet6 fe80::2e0:4cff:fe68:e40c prefixlen 64 scopeid 0x20<link>
ether 00:e0:4c:68:e4:0c txqueuelen 1000 (Ethernet)
RX packets 8263141 bytes 7522353664 (7.0 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 6584566 bytes 1352652248 (1.2 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.3 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::2e0:4cff:fe68:e512 prefixlen 64 scopeid 0x20<link>
ether 00:e0:4c:68:e5:12 txqueuelen 1000 (Ethernet)
RX packets 982735 bytes 116604838 (111.2 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1468657 bytes 1745501259 (1.6 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

eth2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::2e0:4cff:fe68:e40d prefixlen 64 scopeid 0x20<link>
ether 00:e0:4c:68:e4:0d txqueuelen 1000 (Ethernet)
RX packets 36964 bytes 3544756 (3.3 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 50528 bytes 59104618 (56.3 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 145970 bytes 496872242 (473.8 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 145970 bytes 496872242 (473.8 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

sit0: flags=128<NOARP> mtu 1480
sit txqueuelen 0 (IPv6-in-IPv4)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Quote:
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 216.86.203.1 0.0.0.0 UG 2 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
127.0.0.0 127.0.0.1 255.0.0.0 UG 0 0 0 lo
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
216.86.203.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Sat Dec 06, 2014 7:39 pm    Post subject: Reply with quote

You need to enable ip forwarding on the router as well - look in /etc/sysctl.conf and set
Code:
net.ipv4.ip_forward = 1

_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Sat Dec 06, 2014 7:44 pm    Post subject: Reply with quote

Fred Krogh wrote:
I'm not getting there. In changing things I have no wireless at all. I've done a hard reset of the wireless modem, which allegedly sets its ip address to 192.168.1.1. The documentation says that my pc and the router must be on the same subnet. So I'm guessing that this is the problem. Among other things, in /etc/cond.d/net, I have
Quote:
config_eth1="192.168.0.3 netmask 255.255.255.0 broadcast 192.168.0.255"
config_eth2="192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255"
config_192168001001="192.168.1.2/24"


Remove that last line, it's pointless.

Quote:
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 216.86.203.1 0.0.0.0 UG 2 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
127.0.0.0 127.0.0.1 255.0.0.0 UG 0 0 0 lo
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
216.86.203.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0


That looks fine, just enable IP forwarding and you're set.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3135

PostPosted: Sat Dec 06, 2014 11:52 pm    Post subject: Reply with quote

Some things there are unclear, but hey, that's what glass orb is good for :lol: And my glass orb tells me you guys are looking for problem in a wrong place

Let's get some facts from previous posts:
pc-working-as-router has 2 subnets:
eth1 is a local wired network at 192.168.0.3
eth2 is connected to a wireless router at 192.168.2.3
wireless client is connected to 192.168.1.1.

This makes me think that the wireless device you have there is a router and not a dumb AP you expect and want to use.

Also, routers tend to have dedicated WAN interface and several wired LAN sockets. If you connected your PC to WAN port it should just work anyway. My guess is it's some ISDN router with RJ11 WAN socket so you were unable to stuff big RJ45 plug into it. You didn't want to give up this easily, so you connected it to LAN port. You also forgot to disable advanced features intended for making it "plug and play" in it's typical use case. Now the wireless box is smart enough to conflict with your PC instead of simply providing copper-to-air interface.

Have you tried running dhcp client on your eth2? I suppose it would receive a new address from 192.168.1.0 pool.


I mentioned ISDN router because it makes it sound more funny, but exacly the same mistake can be done with other routers so check ports anyway. And disable firewall and DHCP, as you most likely want to use one installed on your PC instead
Back to top
View user's profile Send private message
Fred Krogh
Veteran
Veteran


Joined: 07 Feb 2005
Posts: 1036
Location: Tujunga, CA

PostPosted: Sun Dec 07, 2014 5:21 am    Post subject: Reply with quote

Sorry, I had to leave for a bit. I've set net.ipv4.ip_forward = 1, it was set to 0 before.

That last line printed by route -n, is a mystery to me. There is nothing in /etc/* that matches 216.86.203.0, and lots that match 216.86.203.1. The change to ...forward=1, has made no discernable difference. I hope someone has the patience to help me work through this as it makes no sense to me. I am running shorewall, and looked for forward, and got the following:
Quote:
shorewall.conf:FORWARD_CLEAR_MARK=
shorewall.conf:IP_FORWARDING=On
shorewall.conf:MARK_IN_FORWARD_CHAIN=No
shorewall.conf~:FORWARD_CLEAR_MARK=
shorewall.conf~:IP_FORWARDING=On
shorewall.conf~:MARK_IN_FORWARD_CHAIN=No
Might this suggest anything?

I have dhcpd running, and have reset the wireless router several times. When I access 192.168.1.1 with a browser, it brings up the home page for my web site. I believe this should bring up the configuration screen for the wireless router. (192.168.0.3 and 216.86.203.11 does the same, but those should bring up the home page for my site.)

Perhaps this line in /etc/conf.d/staticroute: staticroute="net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1" could be changed to something that would help?

Are there options in uphcpd or in dnsmasq.conf that should be set a certain way. Many thanks.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54236
Location: 56N 3W

PostPosted: Sun Dec 07, 2014 1:23 pm    Post subject: Reply with quote

Fred Krogh,

For help with shorewall and routing, we need /etc/shorewall/rules

Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         216.86.203.1    0.0.0.0         UG    2      0        0 eth0
0.0.0.0         192.168.2.1     0.0.0.0         UG    4      0        0 eth2
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
127.0.0.0       127.0.0.1       255.0.0.0       UG    0      0        0 lo
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 eth2
216.86.203.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0

routing rules are applied from the bottom of the routing table working up. The fist rule that matches a packet is applied.
The first (bottom) rule says to reach the 216.86.203.0/24 subnet, no gatateway is required as send the packet out of eth0.
Thats probably incorrect unless you own the 216.86.203.0/24 subnet - thats unlikely. Find out where this is being set up and remove it.

The next rule (up) says to reach 192.168.2.0/24, no gateway is required and use eth2.
Next up is to reach 192.168.0.0/24 use eth1 again, no gateway is required.
The 127. ... rules are for lo.
Now it gets trickier and more incorrect.
Destination 0.0.0.0 matches any packets that nave not yet been routed - thats your default route. You may at most have one default route and you have two here.
Anyway,
Code:
0.0.0.0         192.168.2.1     0.0.0.0         UG    4      0        0 eth2

says that for any packets not yet routed send them to 192.168.2.1 over eth2. Essentially, I don't know what to do with these packets but 192.168.2.1 does.
All your internet traffic will be sent here.
The rule
Code:
0.0.0.0         216.86.203.1    0.0.0.0         UG    2      0        0 eth0
can never be reached.
If 192.168.2.1 is your router, thats a good start. You should never have any rules here with your public IP address as your router will have that.
In my best ASCII art, your network looks something like this.
Code:

            ----------                               ----------------
            |        | 192.168.2.1      192.168.2.?  |              |
Internet ---+ Router +-------------------------------+ eth2         |
            |        |                               |              |
            ----------                               |    PC   eth1 +--192.168.0.?
                                                     |              |
                                   216.86.203.?----- + eth0         |
                                                     |              |
                                                     ----------------


You need to use shorewall to do address translation (routing) so that interfaces in subnets other than 192.168.2.0/24 can reach each other and the internet.
Your router will do address translation for any host on the 192.168.2.0/24 subnet. Packets from 192.168.0.0/24 that reach the router should be dropped as they are not routable.
If your router does forward packets from 192.168.0.0/24, your ISP will drop them.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3135

PostPosted: Sun Dec 07, 2014 4:28 pm    Post subject: Reply with quote

Actually the very first post desribes this setup

Code:

            ----------                               ----------------
192.168.2.1 |        |                   192.168.2.?  |              |
WIFI ---+ Router +-------------------------------+ eth2         |
            |        |                               |              |
            ----------                               |    PC   eth0 +-internet
                                                     |              |
                                 192.168.0.?----- + eth1            |
                                                     |              |
                                                     ----------------


And I still think that wifi router is missconfigured. Refer to my previous post for details
Back to top
View user's profile Send private message
Fred Krogh
Veteran
Veteran


Joined: 07 Feb 2005
Posts: 1036
Location: Tujunga, CA

PostPosted: Sun Dec 07, 2014 5:09 pm    Post subject: Reply with quote

Note that I have a switch that connects to other PC's. The switch is downstairs, my main PC, and the wireless router are upstairs. It would be very awkward to change the locations of any of these.

Initially I had the wireless router connected to the internet, and that to my PC. The wireless also connected to the the switch. But I never managed to get that part of the network to work. The problem may have had to do with the way I was setting network addresses.

This is what I think (now?) should work.
Code:

            ----------------------
            |                    |
            | My main PC         |
            |                    |
Internet ---+ eth0 216.86.203.11 |
216.86.203.1|                    |
            | eth1 192.168.0.3   +--- switch 192.168.0.? --- More PC's
            |                    |
            | eth2 192.168.1.2   +--- Wireless router 192.168.1.1 --- more
            |                    |
            ----------------------


According to the manual for my ASUS WL-520GC, to setup IP addresses manually, you need to know the default settings of the ASUS Wireless Router. IP address 192.168.1.1, subnet mask 255.255.255.0

It then goes on to say to set up the connection with a manually assigned IP address, the address of your PC and the wireless router must be within the same subnet.

IP address: 192.168.1.xxx (anything from 2 to 255)
Subnet mask: 255.255.255.0
Gateway: 192.168.1.1

Because the gateway is 192.168.1.1 it seems to me that my eth2 must have that address, but to access the router initially it seems I need to access it at address 192.168.1.1.

So thought I in woeful ignorance, to get restarted, set eth2 to 192.168.1.2, and try to access 192.168.1.1, and once there change settings. But when trying to load 192.168.1.1, I get "This webpage is not available".

Clearly I can get nowhere with this, if I can't even get to the screen used to configure the wireless router. So just to get started I need some way to configure the wireless router, and there seems to be nothing that can be done to accomplish that. I really appreciate the help offered so far. I think I have learned a bit, just not enough! If I manage to get to the router condiguration screen maybe something better can be done
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54236
Location: 56N 3W

PostPosted: Sun Dec 07, 2014 5:42 pm    Post subject: Reply with quote

Fred Krogh,

For this bit to work, your main PC needs to be set up as a router.
Code:
            ----------------------
            |                    |
            | My main PC         |
            |                    |
Internet ---+ eth0 216.86.203.11 |
216.86.203.1|                    |
            | eth1 192.168.0.3   +---
            |                    |
            | eth2 192.168.1.2   +---
            |                    |
            ----------------------
It will have to do Netword Address Translation (NAT) for the 192.168.0.0/24 and 192.168.1.0/24 subnets or they will have no access to the internet.
They may have access to one another without NAT.
You need this regardless of what gets connected to eth1 and eth2. You can also set up a dhcp serwel on your main PC to serve network settings to both the 192.168.0.0/24 and 192.168.1.0/24 subnets.
You mention a "Wireless router" on 192.168.1.1. Exactly what is this device?
If its a dumb Access Point (AP) its a tranparent bridge if its really a router, you need to take care with its settings.
A switch is not an issue.

Setting up your PC as a router is your first step. That guide has you setting up iptables by hand but shorewall can do it too.
You will need the kernel settings and packages described in the guide, on yor main PC.


szatox,
I was unsure if there were any network topology changes since the original post.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Fred Krogh
Veteran
Veteran


Joined: 07 Feb 2005
Posts: 1036
Location: Tujunga, CA

PostPosted: Sun Dec 07, 2014 6:25 pm    Post subject: Reply with quote

[list=]Yes I have changed things as what I had was not working. Once the wireless router (that's an ASUS WL-520GC) was reset, that has its address at 192.168.1.1 (I think!). In /etc/shorewall.masq, I have
Quote:
eth0 192.168.0.0/24 216.86.203.11
eth1 192.168.1.0/24 216.86.203.11
My PC has worked just fine as a router for a long time. And with the configuration I started with the routing was working for the stuff on the wireless network as well. The only problem was that I could not look at the wireless network from my PC. Now that the wireless router has been reset, I can't get to its home page and thus am stuck.

It doesn't seem to me that I shouldn't need to setup NAT for the wireless router just to look at it. In desperation I've tried to ssh to 192.168.1.1, and get "no route to host". I still have
Code:
$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         216.86.203.1    0.0.0.0         UG    2      0        0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
127.0.0.0       127.0.0.1       255.0.0.0       UG    0      0        0 lo
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth2
216.86.203.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0

Ping gives "Destination Host Unreachable". It seems there is no path to reach 192.168.1.1. For completness
Code:
# ifconfig -a
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 216.86.203.11  netmask 255.255.255.0  broadcast 216.86.203.11
        inet6 fe80::2e0:4cff:fe68:e40c  prefixlen 64  scopeid 0x20<link>
        ether 00:e0:4c:68:e4:0c  txqueuelen 1000  (Ethernet)
        RX packets 17579  bytes 12258150 (11.6 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 18168  bytes 3177838 (3.0 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.3  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::2e0:4cff:fe68:e512  prefixlen 64  scopeid 0x20<link>
        ether 00:e0:4c:68:e5:12  txqueuelen 1000  (Ethernet)
        RX packets 13222  bytes 1507886 (1.4 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 13019  bytes 10521880 (10.0 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.2  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::2e0:4cff:fe68:e40d  prefixlen 64  scopeid 0x20<link>
        ether 00:e0:4c:68:e4:0d  txqueuelen 1000  (Ethernet)
        RX packets 299  bytes 176410 (172.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 246  bytes 22309 (21.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth3: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether 00:e0:4c:68:e5:11  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth4: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether f4:6d:04:d6:7d:15  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 823  bytes 185594 (181.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 823  bytes 185594 (181.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

sit0: flags=128<NOARP>  mtu 1480
        sit  txqueuelen 0  (IPv6-in-IPv4)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
[/list]Yes I have changed things as what I had was not working. Once the wireless router (that's an ASUS WL-520GC) was reset, that has its address at 192.168.1.1 (I think!). In /etc/shorewall.masq, I have
Quote:
eth0 192.168.0.0/24 216.86.203.11
eth1 192.168.1.0/24 216.86.203.11
My PC has worked just fine as a router for a long time. And with the configuration I started with the routing was working for the stuff on the wireless network as well. The only problem was that I could not look at the wireless network from my PC. Now that the wireless router has been reset, I can't get to its home page and thus am stuck.

It doesn't seem to me that I shouldn't need to setup NAT for the wireless router just to look at it. In desperation I've tried to ssh to 192.168.1.1, and get "no route to host". I still have
Code:
$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         216.86.203.1    0.0.0.0         UG    2      0        0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
127.0.0.0       127.0.0.1       255.0.0.0       UG    0      0        0 lo
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth2
216.86.203.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0

Ping gives "Destination Host Unreachable". It seems there is no path to reach 192.168.1.1. For completness
Code:
# ifconfig -a
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 216.86.203.11  netmask 255.255.255.0  broadcast 216.86.203.11
        inet6 fe80::2e0:4cff:fe68:e40c  prefixlen 64  scopeid 0x20<link>
        ether 00:e0:4c:68:e4:0c  txqueuelen 1000  (Ethernet)
        RX packets 17579  bytes 12258150 (11.6 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 18168  bytes 3177838 (3.0 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.3  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::2e0:4cff:fe68:e512  prefixlen 64  scopeid 0x20<link>
        ether 00:e0:4c:68:e5:12  txqueuelen 1000  (Ethernet)
        RX packets 13222  bytes 1507886 (1.4 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 13019  bytes 10521880 (10.0 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.2  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::2e0:4cff:fe68:e40d  prefixlen 64  scopeid 0x20<link>
        ether 00:e0:4c:68:e4:0d  txqueuelen 1000  (Ethernet)
        RX packets 299  bytes 176410 (172.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 246  bytes 22309 (21.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth3: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether 00:e0:4c:68:e5:11  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth4: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether f4:6d:04:d6:7d:15  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 823  bytes 185594 (181.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 823  bytes 185594 (181.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

sit0: flags=128<NOARP>  mtu 1480
        sit  txqueuelen 0  (IPv6-in-IPv4)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54236
Location: 56N 3W

PostPosted: Sun Dec 07, 2014 7:20 pm    Post subject: Reply with quote

[Fred Krogh,

That all looks mostly harmless. The manual for your wireless router, it is a router, not a dumb access point, says that its default IP is 192.168.1.1

How did your PC get this setup?
code]eth2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.255 [/code]
Your wireless router will be handing out IP addresses using dhcp now its been reset.
If this address is manually assigned, it may have been allocated by dhcp to somethinfg else too.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Fred Krogh
Veteran
Veteran


Joined: 07 Feb 2005
Posts: 1036
Location: Tujunga, CA

PostPosted: Sun Dec 07, 2014 7:31 pm    Post subject: Reply with quote

I don't usually (and don't now) have dhcpd running on my PC. When I had the wireless router working I was using it there. The stuff you referred to was set in /etc/conf.d/net which contains:
Code:
config_eth0="216.86.203.11  netmask 255.255.255.0 broadcast 216.86.203.11"
routes_eth0="default via 216.86.203.1"
nis_domain_eth0="mathalacarte.com"
dns_domain_eth0="mathalacarte.com"
dns_servers_eth0="8.8.8.8 8.8.4.4"
config_eth1="192.168.0.3 netmask 255.255.255.0 broadcast 192.168.0.255"
config_eth2="192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.255"
I'm not clear on what address you say may have been reassigned. Are you referring to the value used for eth2. If so, I guess I could try the other 253 possible values. Many thanks for your time and effort put into this.
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3135

PostPosted: Sun Dec 07, 2014 7:38 pm    Post subject: Reply with quote

Well, if everything works but you just can't see wireless network from your PC (previous posts suggested you can't see your PC from wireless network), it's because SOHO routers tend to have NAT enabled by default and it filters any trafic you would like to send to wireless segment.
Also, you can't access router's configuration page from your PC because from router's perspective you are connected over WAN which makes you an attacker rather than an admin.

As a side note, you're reinventing Great Chinese Wall with your layers upon layers of NATs and routers.
Back to top
View user's profile Send private message
Fred Krogh
Veteran
Veteran


Joined: 07 Feb 2005
Posts: 1036
Location: Tujunga, CA

PostPosted: Sun Dec 07, 2014 7:47 pm    Post subject: Reply with quote

I agree with you Chinese Wall comment, but at the moment I'm just trying to get the wireless router configured. For what it is worth the wireless network is no longer showing up on my laptop so I can't even get at it from there.
Back to top
View user's profile Send private message
Fred Krogh
Veteran
Veteran


Joined: 07 Feb 2005
Posts: 1036
Location: Tujunga, CA

PostPosted: Sun Dec 07, 2014 8:19 pm    Post subject: Reply with quote

Just tried plugging the cord from my PC into a LAN port on the router. It will now respond to a ping to 192.168.1.1, but after a long time reports "This webpage is not available". There for a moment, I thought maybe I might get this sucker configured.
Back to top
View user's profile Send private message
Fred Krogh
Veteran
Veteran


Joined: 07 Feb 2005
Posts: 1036
Location: Tujunga, CA

PostPosted: Mon Dec 08, 2014 5:20 pm    Post subject: Reply with quote

I've tried linking the wireless LAN port to a laptop that runs windows xp and ubuntu. After changing the network configurations, both would ping the modem at 192.168.1.1, but neither could load that address from the browser. I have decide it is time to give up on this one. Anyone care to suggest a wireless router/switch that is Linux friendly? Thanks for all the help.
Fred
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54236
Location: 56N 3W

PostPosted: Mon Dec 08, 2014 7:28 pm    Post subject: Reply with quote

Fred Krogh,

Do you really need a router or would you rather use an accees point?
An access point has less to fiddle with and get right.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum