[Novalug] simple route issue - howto
Walt Smith
waltechmail@yahoo.com
Fri Dec 30 17:45:47 EST 2016
Hi,
I have a simple route problem. I'm probably
missing just one thing. TO approach that,
I merely tried a number of combinations that
theory doesn't seem to cover when actually
using commands. It using static routing.
( note most web blogs etc discuss routing between
eth0 and eth1, which this is not )
The idea is I CAN assign 192.168.1.1 to the
eth0 interface, and route with netmask 255.255.255.0
and access any devices on several "routers" with
192.168.1.x addresses.
I CAN also do the same with a 192.168.2.1 IF address on
eth0 and access ( web and ping ) say a 192.168.2.10.
I CANNOT access Both a 1.x and 2.x boxes
( say cheap routers ).
I wish to do so.
SO what do I need to do ?
??
----------------
see below for various merged examples for readablilty . . . .
I'm aware that route and ifconfig can
assume certain parameters and auto-include them
when the user/script gives info: for example,
route can assume a netmask, or a -net option
in certain conditions. It can also perform
an entry by setting an IP for an interface
such as eth0.
So below is an expanded version of efforts that
might be tried ( not all at one time, but one at a time
in various combos to try to understand in what order
route and ifconfig do things.
[root@CentOS68 waltech]# route add -net 192.168.0.0 netmask 255.255.0.0 eth0
[root@CentOS68 waltech]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
209.163.113.81 * 255.255.255.255 UH 0 0 0 ppp0
192.168.2.1 192.168.1.1 255.255.255.255 UGH 0 0 0 eth0
192.168.2.0 * 255.255.255.0 U 0 0 0 eth0
192.168.2.0 192.168.1.1 255.255.255.0 UG 0 0 0 eth0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
192.168.1.0 192.168.1.1 255.255.255.0 UG 0 0 0 eth0
192.168.0.0 * 255.255.0.0 U 0 0 0 eth0
default * 0.0.0.0 U 0 0 0 ppp0
[root@CentOS68 waltech]#
[root@CentOS68 waltech]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:F1:8B:DF:79
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20c:f1ff:fe8b:df79/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5558 errors:0 dropped:0 overruns:0 frame:0
TX packets:4801 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3231777 (3.0 MiB) TX bytes:490218 (478.7 KiB)
ppp0 Link encap:Point-to-Point Protocol
inet addr:69.72.61.101 P-t-P:209.163.113.81 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:552 Metric:1
RX packets:7932 errors:4 dropped:0 overruns:0 frame:0
TX packets:8563 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:2945795 (2.8 MiB) TX bytes:693102 (676.8 KiB)
----
The government is lawless, not the press (people).
( [Supreme Court] Justice Douglas re: The Pentagon Papers )
More information about the Novalug
mailing list