Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Home network completely not working
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
DSHugo
n00b
n00b


Joined: 26 Aug 2007
Posts: 46

PostPosted: Thu Oct 04, 2007 9:59 pm    Post subject: Home network completely not working Reply with quote

Hello.
Here goes the long and sad story:
I've got a server, connected to internet using pppoe, on eth0, a switch conected on eth1 and a notebook with winXP connected to switch. The problem is: the server could access internet normally, the notebook can't. Neither of these can ping each other.
Everything is done according to http://www.gentoo.org/doc/en/home-router-howto.xml (except that some more options are enabled in kernel, and though I have dynamic IP I don't use dhcp - my isp sucks). Everything I've got:

Server:

ifconfig -a
Code:

eth0      Link encap:Ethernet  HWaddr 00:08:A1:4E:96:53 
          inet addr:192.168.0.2  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:28509 errors:0 dropped:0 overruns:0 frame:0
          TX packets:28247 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:13109415 (12.5 Mb)  TX bytes:23399413 (22.3 Mb)
          Interrupt:21 Base address:0x8800

eth1      Link encap:Ethernet  HWaddr 00:19:D1:FA:35:39 
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:121 errors:0 dropped:0 overruns:0 frame:0
          TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:12913 (12.6 Kb)  TX bytes:3809 (3.7 Kb)
          Base address:0x40e0 Memory:93200000-93220000

gre0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-80-60-00-00-00-00-00-00-00-00 
          NOARP  MTU:1476  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:240 errors:0 dropped:0 overruns:0 frame:0
          TX packets:240 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:8389 (8.1 Kb)  TX bytes:8389 (8.1 Kb)

ppp0      Link encap:Point-to-Point Protocol 
          inet addr:78.56.XX.XX  P-t-P:213.190.60.6  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:28430 errors:0 dropped:0 overruns:0 frame:0
          TX packets:28136 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:12479155 (11.9 Mb)  TX bytes:22772057 (21.7 Mb)

tunl0     Link encap:IPIP Tunnel  HWaddr   
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)


I'm using dnmasq (dbus -isc -resolvconf -tftp):
/etc/dnsmasq.conf
Code:

interface=eth1
dhcp-range=192.168.0.10,192.168.0.250,72h


An all-alowing iptables conf (iptables-save -c):
Code:

*raw
:PREROUTING ACCEPT [10733229:7874335830]
:OUTPUT ACCEPT [12133498:6211913387]
COMMIT
*nat
:PREROUTING ACCEPT [178739:15881944]
:POSTROUTING ACCEPT [33940:3172703]
:OUTPUT ACCEPT [199246:17518118]
[4:372] -A POSTROUTING -o ppp0 -j MASQUERADE
COMMIT
*mangle
:PREROUTING ACCEPT [3476363:2551369799]
:INPUT ACCEPT [3475293:2551240086]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [3876474:2013852652]
:POSTROUTING ACCEPT [3886113:2015130937]
COMMIT
*filter
:INPUT ACCEPT [1416:515588]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [1014:914992]
COMMIT


/var/log/messages (Asus is a name of notebook)
Code:

Oct  5 00:19:22 gnaritas ntpd[7316]: precision = 1.000 usec
Oct  5 00:19:22 gnaritas ntpd[7316]: Listening on interface #0 wildcard, 0.0.0.0#123 Disabled
Oct  5 00:19:22 gnaritas ntpd[7316]: Listening on interface #1 lo, 127.0.0.1#123 Enabled
Oct  5 00:19:22 gnaritas ntpd[7316]: Listening on interface #2 eth0, 192.168.0.2#123 Enabled
Oct  5 00:19:22 gnaritas ntpd[7316]: Listening on interface #3 eth1, 192.168.0.1#123 Enabled
Oct  5 00:19:22 gnaritas ntpd[7316]: Listening on interface #4 ppp0, 78.56.XX.XX#123 Enabled
Oct  5 00:19:22 gnaritas ntpd[7316]: kernel time sync status 0040
Oct  5 00:19:22 gnaritas ntpd[7316]: frequency initialized -26.700 PPM from /var/lib/ntp/ntp.drift
Oct  5 00:19:23 gnaritas cron[7376]: (CRON) STARTUP (V5.0)
Oct  5 00:19:31 gnaritas login(pam_unix)[7444]: session opened for user gnaritas by (uid=0)
Oct  5 00:19:33 gnaritas i2c-adapter i2c-1: adapter [NVIDIA i2c adapter ] registered
Oct  5 00:19:33 gnaritas i2c-adapter i2c-2: adapter [NVIDIA i2c adapter ] registered
Oct  5 00:19:33 gnaritas i2c-adapter i2c-3: adapter [NVIDIA i2c adapter ] registered
Oct  5 00:19:59 gnaritas su[7579]: Successful su for root by gnaritas
Oct  5 00:19:59 gnaritas su[7579]: + pts/0 gnaritas:root
Oct  5 00:19:59 gnaritas su(pam_unix)[7579]: session opened for user root by (uid=1000)
Oct  5 00:20:01 gnaritas cron[7633]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )
Oct  5 00:20:33 gnaritas su[7673]: Successful su for root by gnaritas
Oct  5 00:20:33 gnaritas su[7673]: + pts/1 gnaritas:root
Oct  5 00:20:33 gnaritas su(pam_unix)[7673]: session opened for user root by (uid=1000)
Oct  5 00:22:08 gnaritas dnsmasq[6919]: DHCPREQUEST(eth1) 192.168.0.10 00:11:2f:9d:4c:c9
Oct  5 00:22:08 gnaritas dnsmasq[6919]: DHCPACK(eth1) 192.168.0.10 00:11:2f:9d:4c:c9 ASUS
Oct  5 00:22:12 gnaritas dnsmasq[6919]: DHCPREQUEST(eth1) 192.168.0.10 00:11:2f:9d:4c:c9
Oct  5 00:22:12 gnaritas dnsmasq[6919]: DHCPACK(eth1) 192.168.0.10 00:11:2f:9d:4c:c9 ASUS
Oct  5 00:22:20 gnaritas dnsmasq[6919]: DHCPREQUEST(eth1) 192.168.0.10 00:11:2f:9d:4c:c9
Oct  5 00:22:20 gnaritas dnsmasq[6919]: DHCPACK(eth1) 192.168.0.10 00:11:2f:9d:4c:c9 ASUS
Oct  5 00:22:47 gnaritas dnsmasq[6919]: DHCPDISCOVER(eth1) 192.168.0.10 00:11:2f:9d:4c:c9
Oct  5 00:22:47 gnaritas dnsmasq[6919]: DHCPOFFER(eth1) 192.168.0.10 00:11:2f:9d:4c:c9
Oct  5 00:22:47 gnaritas dnsmasq[6919]: DHCPREQUEST(eth1) 192.168.0.10 00:11:2f:9d:4c:c9
Oct  5 00:22:47 gnaritas dnsmasq[6919]: DHCPACK(eth1) 192.168.0.10 00:11:2f:9d:4c:c9 ASUS

(Notebook was booted when server was running)

cat /proc/sys/net/ipv4/ip_forward:
Code:
1


Code:

ls /proc/sys/net/ipv4/conf/
all  default  eth0  eth1  gre0  lo  ppp0  tunl0
for f in /proc/sys/net/ipv4/conf/*/rp_filter ; do cat $f; done
1
1
1
1
1
1
1
1


Notebook:
route print:
Code:

===========================================================================

Interface List
0x1 ........................... MS TCP Loopback interface
0x10003 ...00 11 2f 9d 4c c9 ...... SiS 900-Based PCI Fast Ethernet Adapter - Pa
cket Scheduler Miniport
===========================================================================
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0      192.168.0.1    192.168.0.10       20
        127.0.0.0        255.0.0.0        127.0.0.1       127.0.0.1       1
      192.168.0.0    255.255.255.0     192.168.0.10    192.168.0.10       20
     192.168.0.10  255.255.255.255        127.0.0.1       127.0.0.1       20
    192.168.0.255  255.255.255.255     192.168.0.10    192.168.0.10       20
        224.0.0.0        240.0.0.0     192.168.0.10    192.168.0.10       20
  255.255.255.255  255.255.255.255     192.168.0.10    192.168.0.10       1
Default Gateway:       192.168.0.1
===========================================================================
Persistent Routes:
  None


ipconfig
Code:

Windows IP Configuration
Ethernet adapter Local Area Connection:
        Connection-specific DNS Suffix  . :
        IP Address. . . . . . . . . . . . : 192.168.0.10
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . : 192.168.0.1


The question is simple: what is wrong and what could be done? I'm running on emt64 machine with 2.6.22-r5 kernel. That's not good what I have :/
Back to top
View user's profile Send private message
DSHugo
n00b
n00b


Joined: 26 Aug 2007
Posts: 46

PostPosted: Fri Oct 05, 2007 7:38 am    Post subject: Reply with quote

*Offtopic: I've got an email today, notifying that there was a reply to the above post, but there isn't and the link in the email is not working.
Back to top
View user's profile Send private message
snIP3r
l33t
l33t


Joined: 21 May 2004
Posts: 853
Location: germany

PostPosted: Fri Oct 05, 2007 7:58 am    Post subject: Reply with quote

hi!

you made a mistake! eth0 should never get a static ip adress like in your config:

Code:

eth0      Link encap:Ethernet  HWaddr 00:08:A1:4E:96:53
          inet addr:192.168.0.2  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:28509 errors:0 dropped:0 overruns:0 frame:0
          TX packets:28247 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:13109415 (12.5 Mb)  TX bytes:23399413 (22.3 Mb)
          Interrupt:21 Base address:0x8800

this was also not mentioned in the howto ;)
i have a similar config (expect the dhcp server - i use dhcpd) and can post my config when i am @home...

please post your /etc/conf.d/net

HTH
snIP3r
_________________
Intel i3-4130T on ASUS P9D-X
Kernel 5.15.88-gentoo SMP
-----------------------------------------------
if your problem is fixed please add something like [solved] to the topic!
Back to top
View user's profile Send private message
DSHugo
n00b
n00b


Joined: 26 Aug 2007
Posts: 46

PostPosted: Fri Oct 05, 2007 8:19 am    Post subject: Reply with quote

/etc/conf.d/net:
Code:
config_eth0=( "192.168.0.2 netmask 255.255.255.0 brd 192.168.0.255" )
config_eth1=( "192.168.0.1 netmask 255.255.255.0 brd 192.168.0.255" )
config_ppp0=( "ppp" )
link_ppp0="eth0"
plugins_ppp0=( "pppoe" )
username_ppp0=( "username" )
password_ppp0=( "pass" )
pppd_ppp0=(
        "noauth"
        "defaultroute"
        "usepeerdns"
        "default-asyncmap"
        "ipcp-accept-remote"
        "ipcp-accept-local"
        "lcp-echo-interval 15"
        "lcp-echo-failure 3"
#       "persisit"
        "holdoff 3"
#       "lock"
        "mru 1492"
        "mtu 1492"
        "debug"
        noaccomp noccp nobsdcomp nodeflate nopcomp novj novjccomp
)
depend_ppp0(){
        need net.eth0
}


But why shouldn't it? I mean what's the problem? Thanks for responding anyway :)
Back to top
View user's profile Send private message
DSHugo
n00b
n00b


Joined: 26 Aug 2007
Posts: 46

PostPosted: Fri Oct 05, 2007 11:53 am    Post subject: Reply with quote

Well, I've changed to
Code:
config_eth0=( "dhcp" )
in /etc/conf.d/net. The network is working now (but I still don't get why). + When I start eth0, I've got:
Code:

 * Starting eth0
 *   Bringing up eth0
 *     dhcp
 *       Running dhcpcd ...
Error, eth0: timed out                                                    [ ok ]
 *       eth0 received address 169.254.XX.XX/16
 * Starting ppp0
 *   Bringing up ppp0
 *     ppp
 *       Running pppd ...
 *       Backgrounding ...
 * WARNING:  dnsmasq is scheduled to start when net.ppp0 has started.
 * WARNING:  netmount is scheduled to start when net.ppp0 has started.
 * WARNING:  apache2 is scheduled to start when net.ppp0 has started.
 * WARNING:  dnsmasq is scheduled to start when net.ppp0 has started.
 * WARNING:  netmount is scheduled to start when net.ppp0 has started.
 * WARNING:  dnsmasq is scheduled to start when net.ppp0 has started.
 * WARNING:  ntp-client is scheduled to start when net.ppp0 has started.
 * WARNING:  dnsmasq is scheduled to start when net.ppp0 has started.
 * WARNING:  ntpd is scheduled to start when net.ppp0 has started.
 * WARNING:  dnsmasq is scheduled to start when net.ppp0 has started.
 * WARNING:  sshd is scheduled to start when net.ppp0 has started.


But I suppose it is the beginning of another sad story.. (Though /etc/init.d/net.ppp0 status says 'active' when run immediately after all of the above output)

P.S. (1 hour later)
Code:
config_eth0=( "10.0.0.1 netmask 255.255.255.0 brd 10.0.0.255" )
gives almos the same result: network working, and only dnsmasq and netmount warnings are issued during boot (when running and restarting eth0 all of them are issued). I'm quite happy with this :D

Last edited by DSHugo on Fri Oct 05, 2007 12:22 pm; edited 2 times in total
Back to top
View user's profile Send private message
snIP3r
l33t
l33t


Joined: 21 May 2004
Posts: 853
Location: germany

PostPosted: Fri Oct 05, 2007 12:16 pm    Post subject: Reply with quote

DSHugo wrote:
Well, I've changed to
Code:
config_eth0=( "dhcp" )
in /etc/conf.d/net. The network is working now (but I still don't get why). + When I start eth0, I've got:
Code:

 * Starting eth0
 *   Bringing up eth0
 *     dhcp
 *       Running dhcpcd ...
Error, eth0: timed out                                                    [ ok ]
 *       eth0 received address 169.254.XX.XX/16
 * Starting ppp0
 *   Bringing up ppp0
 *     ppp
 *       Running pppd ...
 *       Backgrounding ...
 * WARNING:  dnsmasq is scheduled to start when net.ppp0 has started.
 * WARNING:  netmount is scheduled to start when net.ppp0 has started.
 * WARNING:  apache2 is scheduled to start when net.ppp0 has started.
 * WARNING:  dnsmasq is scheduled to start when net.ppp0 has started.
 * WARNING:  netmount is scheduled to start when net.ppp0 has started.
 * WARNING:  dnsmasq is scheduled to start when net.ppp0 has started.
 * WARNING:  ntp-client is scheduled to start when net.ppp0 has started.
 * WARNING:  dnsmasq is scheduled to start when net.ppp0 has started.
 * WARNING:  ntpd is scheduled to start when net.ppp0 has started.
 * WARNING:  dnsmasq is scheduled to start when net.ppp0 has started.
 * WARNING:  sshd is scheduled to start when net.ppp0 has started.


But I suppose it is the beginning of another sad story.. (Though /etc/init.d/net.ppp0 status says 'active' when run immediately after all of the above output)


hi!

you cannot get eth0 to be dhcp because it is bound to ppp0 to be the internet interface. eth1 has to be dhcp...

my config looks like this:
Code:

# ppp0 device adsl
config_ppp0=( "ppp" )
# eth0 device binding for adsl
config_eth0=( null )
link_ppp0="eth0"

# eth1 device dhcpd, internal network
config_eth1=( "192.168.0.1 netmask 255.255.255.0" )
dns_domain_lo="MYDOMAIN.COM"

plugins_ppp0=( "pppoe" )
username_ppp0='USERNAME'
password_ppp0='PASSWORD'
pppd_ppp0=(
#  "debug"      # Enables syslog debugging
  "noauth"
  "defaultroute"
  "usepeerdns"
  "holdoff 3"
  "child-timeout 60"
  "lcp-echo-interval 15"
  "lcp-echo-failure 3"
  noaccomp noccp nobsdcomp nodeflate nopcomp novj novjccomp
)

depend_ppp0() {
  need net.eth0
        }


this config runs perfect.

greets
snIP3r
_________________
Intel i3-4130T on ASUS P9D-X
Kernel 5.15.88-gentoo SMP
-----------------------------------------------
if your problem is fixed please add something like [solved] to the topic!
Back to top
View user's profile Send private message
mrness
Retired Dev
Retired Dev


Joined: 17 Feb 2004
Posts: 375
Location: bucharest.ro

PostPosted: Mon Oct 08, 2007 9:06 pm    Post subject: Reply with quote

1) eth0 is not "bound" to ppp0; it can have its own IP settings even if you have a PPPoE connection using it. However, unless you have some device connected to eth0 you wanna administer from the router, I advise you to set config_eth0=null.
2) Services that depend on net.ppp0 will get started when net.ppp0 gets active. Check with rc-status to see they are indeed started once net.ppp0 gets activated.
3) You cannot have same network address on eth0 AND eth1. Unless you set a bridge, those networks must be distinct.
4) username_ppp0 and password_ppp0 are not arrays and their value should be single quoted for avoiding parameter expansion. You should re-read PPP chapter of net.example.
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
Page 1 of 1

 
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