Linux / UNIX Tech Support Forum
This is a discussion on Determining IP information for eth0 .... nothing to flush......failed. within the Networking, Firewalls and Security forums, part of the Mastering Servers category; Hello I am a new user to Linux but in the last couple of months gained some Idea about it, ...
|
Register free or login to your existing account and remove all advertisements. |
|
|||||||
| Networking, Firewalls and Security No it's not a secret. Talk about firewalls and security issues. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hello
I am a new user to Linux but in the last couple of months gained some Idea about it, I am trying to set up a small network in my office having 3 windows xp PCs, two fedora10 PCs I have an adsl router with 4-port hub connecting to the internet, one switch (say sw1) and one linux PC (say linux1) is connected directly to the router, the three win xp PCs are connected to switch sw1. all the above is working fine, I am able to get connected to Internet In all the systems, and able to network among all the above four. Now I want to make the linux1 as a proxy server for, hence I added another network card into it connected it to another switch sw2, which is connected to another linux pc (say linux2). I have tried a hundred things, and googled an equal no. and finally posting it here. In order to reduce confusion I have disabled DHCP in all machines, and given static ips instead NetworkManager was not happy about it, hence to fix my static IP i disabled NetworkManager ('chkconfig NetworkManager off') |---winxp3 |---winxp2 |---winxp1 | sw1 | router--(eth0)linux1(eth1)--sw2--(eth0)linux2 | internet the above is a schematic of my network, sw1 and sw2 are 8 port-switches all is well except there is no visibility between the two linux systems linux1 and linux2, This is the /etc/sysconfig/network-scripts/ifcfg-eth0, of linux1 DEVICE=eth0 BOOTPROTO=static BROADCAST=192.168.1.255 HWADDR=00:e0:27:21:01:17 IPADDR=192.168.1.3 NETMASK=255.255.255.0 NETWORK=192.168.1.0 ONBOOT=yes GATEWAY=192.168.1.1 TYPE=Ethernet NM_CONTROLLED=no USERCTL=no PEERDNS=yes MII_NOT_SUPPORTED=yes DNS1=192.168.1.1 # where i found in /etc/resolv.conf this is the -------/etc/sysconfig/network-scripts/ifcfg-eth1, of linux1------- DEVICE=eth1 BOOTPROTO=static ONBOOT=yes HWADDR=00:1f:d0:32:29:a7 IPADDR=192.168.2.3 # here I want make different class of network NETMASK=255.255.255.0 TYPE=Ethernet USERCTL=no PEERDNS=no NETWORK=192.168.2.0 BROADCAST=192.168.2.255 GATEWAY=192.168.1.3 ---# this linux1 static IP ------------this is the "ifconfig" of linux1-------------- eth0---- Link encap:Ethernet HWaddr 00:E0:27:21:01:17 inet addr:192.168.1.3 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::2e0:27ff:fe21:117/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:8021 errors:0 dropped:0 overruns:0 frame:0 TX packets:9165 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:4855236 (4.6 MiB) TX bytes:1716932 (1.6 MiB) Interrupt:16 Memory:fa000000-fa0000ff eth1 Link encap:Ethernet HWaddr 00:1F0:32:29:A7 inet addr:192.168.2.3 Bcast:192.168.2.255 Mask:255.255.255.0 --------------- do------------------ lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:95 errors:0 dropped:0 overruns:0 frame:0 TX packets:95 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:18290 (17.8 KiB) TX bytes:18290 (17.8 KiB) --------- this is interface from linux1 --------- auto lo iface lo inet loopback address 127.0.0.1 netmask 255.255.255.0 auto eth0 iface eth0 inet static address 192.168.1.3 netmask 255.255.255.0 broadcast 192.168.1.255 gateway 192.168.1.1 auto eth1 iface eth1 inet static address 192.168.2.3 netmask 255.255.255.0 broadcast 192.168.2.255 ----------this is iptables -L from linux1-------- Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination the above all is from Linux1 now i would like to connect to LAN usins DHCP for assigning IP's. then trying with Linux2, i am not able to connect to the LAN, even i am not able to find any IP from DHCP.... if I say in command line " ifconfig" eth0 Link encap:Ethernet HWaddr 00:1F inet6 addr: fe80::21f:d0ff:fe42:d90/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1 errors:2 dropped:0 overruns:0 frame:2 TX packets:22 errors:1 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:60 (60.0 b) TX bytes:4696 (4.5 KiB) Interrupt:20 Base address:0xe000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:12 errors:0 dropped:0 overruns:0 frame:0 TX packets:12 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:800 (800.0 b) TX bytes:800 (800.0 b) ------------------ Here i am not getting IP.................................... please help me and let me know where am i doing wrong...???? I would be very happy you could solve my problem..... Best regards Slims. |
| Sponsored Links | ||
|
|
|
||||
|
The traffic between eth0 and eth1 will be routed only if you enable IP forwarding and use iptables to setup Linux as a router. You do not need two Linux PCs. A single computer with two network card can act as proxy and router.
|xp1 |xp2 |xp3 | Lan switch | | eth0 ------ Linux Box ------ eth1 ---> Internet Your Linux box can act as firewall, proxy and NAT device. It will protect LAN from the Internet problems and attacks. How to setup Linux as a router for DSL, T1 line etc
__________________
Vivek Gite Linux Evangelist |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Routing/copying data from eth0 and send over eth1 and eth2 | theVOID | Networking, Firewalls and Security | 2 | 04-14-2008 06:02 PM |
| determining the type of buffer | sathiya | Coding in General | 1 | 02-20-2008 09:23 PM |
| how to rename eth0 to eth1 | deltamails | Networking, Firewalls and Security | 1 | 09-24-2007 08:53 PM |
| eth0.1 vlan linux config command | chimu | Linux software | 1 | 07-19-2006 11:44 PM |
| Device eth0 does not seem to be present error and solution | jerry | Linux software | 1 | 06-20-2006 06:07 PM |