[+] Combo ZTE przez ethernet i Lenny jako ruter

Masz problemy z siecią bądź internetem? Zapytaj tu
boskar
Posty: 20
Rejestracja: 20 listopada 2010, 11:01

[+] Combo ZTE przez ethernet i Lenny jako ruter

Post autor: boskar »

Witam forumowiczów.

Od paru dni jestem szczęśliwym posiadaczem nowego wynalazku sprzedawanego przez TPSA (choć w moim wypadku z allegro) znanego pod nazwą ZTE Combo 831.

Urządzenie jest bardzo ciekawe, myślę, że mogę śmiało powiedzieć, że to najlepsze co w tej chwili jest do neostrady, jeśli ma się neostradę i chce się publicznego IP na maszynie z Debianem.

Niemniej jednak mam pewien problem, niestety nie wiem, po której stronie leży (modemu czy mojej konfiguracji Lennego).

Przestawiłem modem w tryb "Rozszerzenie PPP IP" - niech się to nazywa jak chce, w każdym razie to właśnie ta opcja odpowiadała za to, żeby modem przestał się zachowywać jak router i przekazał IP dalej, do maszyny podpiętej do wyboru przez USB lub Ethernet.

Zewnętrzne IP Lenny pobiera za pośrednictwem dhclienta, cała konfiguracja ADSL odbywa się przez panel http modemu.
Na Lennym nie jest zainstalowany networkmanager, to stareńki sprzęt klasy P2, od lat robi za router, do czwartku z modemem USB wszystko działało.

Konfiguracja odbywa się przez /etc/network/interfaces.

Po wycięciu komentarzy zostaje w nim tyle:

Kod: Zaznacz cały

~# cat /etc/network/interfaces 

auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet static
	address 192.168.0.1
	netmask 255.255.255.0
#	network 192.168.0.0
#	broadcast 192.168.0.255
	# dns-* options are implemented by the resolvconf package, if installed
	dns-nameservers 127.0.0.1
	dns-search hopto.org

auto eth0:0
iface eth0:0 inet static
	address 192.168.0.100
	netmask 255.255.255.255

auto ppp0
iface ppp0 inet ppp
	provider neostrada
	name Speedtouch 330 neo+ 512

auto eth2
iface eth2 inet dhcp
Właściwie ppp0 można usunąć, nie sądzę jednak żeby coś psuło. eth0 idzie do przełącznika, eth2 podpięte do Combo ZTE. (eth1 kiedyś było, na tym komputerze już w ogóle dużo konfiguracji sieciowych było).

Problem polega na tym, że tablica rutingu po włączeniu komputera wygląda tak:

Kod: Zaznacz cały

:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
83.30.164.0     *               255.255.255.0   U     0      0        0 eth2
localnet        *               255.255.255.0   U     0      0        0 eth0
żeby uzyskać internet muszę wykonać:

Kod: Zaznacz cały

route add default eth2
Wtedy tablica rutingu wygląda tak:

Kod: Zaznacz cały

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
83.30.164.0     *               255.255.255.0   U     0      0        0 eth2
localnet        *               255.255.255.0   U     0      0        0 eth0
default         *               0.0.0.0         U     0      0        0 eth2
Niemniej jednak tablica taka znika po odświeżeniu dhcp, czyli dość szybko.
Prawdopodobnie muszę wymusić, aby dhclient ustawiał eth2 jako domyślną bramę - pytanie czy nie dostaję takiej informacji od routera (tam jest sporo opcji dotyczących RIP, w których się nie wyznaję, nie dotykałem), bądź też Lenny taką informację dostaje, jednak ją ignoruje - z jakiegoś powodu.

Mój dhclient.conf - niestety nie wiem czy go nie modyfikowałem - ten komputer rutował już w naprawdę dziwnych sytuacjach: http://paste.debian.net/100265/

Każda pomoc jest mile widziana. Dodam jeszcze, że iptables oczywiście jest skonfigurowane prawidłowo:

Kod: Zaznacz cały

-j MASQUERADE -o eth2, itd.
na tym komputerze działa dhcpd i bind, nie tylko z pamięcią podręczną, kontroluje domenę w LAN .boskarnet.prv

Ach, wspomnę jeszcze, o resolv.conf - w całości zostało pobrane z Combo ZTE, tam w ustawieniach widnieje domena Home:

Kod: Zaznacz cały

 
domain Home
search Home
nameserver 194.204.152.34


Wybaczcie przydługawy post, chciałem dobrze naświetlić problem. Google generalnie po wpisaniu:

Kod: Zaznacz cały

combo zte debian routing ethernet
czy tego typu haseł nic ciekawego nie mówią.

/edit poprawka ruter -> router ( http://so.pwn.pl/lista.php?co=router a nie http://so.pwn.pl/lista.php?co=ruter )
sonic
Posty: 1
Rejestracja: 25 listopada 2010, 18:23

Post autor: sonic »

U mnie sprawa wygląda podobnie, lecz nie połączę się dłużej jak 7 minut przy PPPoE a to rozszerzenie co 15 sekund wyrzuca nowe ustawienia co już jest wkurzające.
fnmirk
Senior Member
Posty: 8321
Rejestracja: 03 grudnia 2007, 06:37

Post autor: fnmirk »

boskar, co masz ustawione w plikach:

Kod: Zaznacz cały

/etc/resolvconf/resolv.conf.d/base
/etc/resolv.conf
boskar
Posty: 20
Rejestracja: 20 listopada 2010, 11:01

Post autor: boskar »

Kod: Zaznacz cały

​limes:~# cat /etc/resolv.conf 
domain Home
search Home
nameserver 194.204.152.34
limes:~# ls /etc/resolv*
/etc/resolv.conf

/etc/resolvconf:
update-libc.d

/etc/resolvconf.d:
update-libc.d
limes:~# ls /etc/resolvconf.d/update-libc.d/
squid3
limes:~# ls /etc/resolvconf/update-libc.d/
squid
fnmirk
Senior Member
Posty: 8321
Rejestracja: 03 grudnia 2007, 06:37

Post autor: fnmirk »

Jaki masz wynik polecenia:

Kod: Zaznacz cały

dpkg -l | grep resolvconf
I jeszcze:

Kod: Zaznacz cały

ifconfing -a
ifconfig
boskar
Posty: 20
Rejestracja: 20 listopada 2010, 11:01

Post autor: boskar »

Kod: Zaznacz cały

limes:~# ifconfig 
eth0      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: xxxx::xxx:xxx:xxxx:xxxx/xx Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:227 errors:0 dropped:0 overruns:0 frame:0
          TX packets:232 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:22086 (21.5 KiB)  TX bytes:31282 (30.5 KiB)

eth0:0    Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:192.168.0.100  Bcast:192.168.0.255  Mask:255.255.255.255
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth2      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:83.26.136.115  Bcast:83.26.136.255  Mask:255.255.255.0
          inet6 addr: xxxx::xxx:xxxx:xxxx:xxxx/xx Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:23 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2902 (2.8 KiB)  TX bytes:1956 (1.9 KiB)
          Interrupt:11 Base address:0x1400 

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:241 errors:0 dropped:0 overruns:0 frame:0
          TX packets:241 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:25524 (24.9 KiB)  TX bytes:25524 (24.9 KiB)

Kod: Zaznacz cały

limes:~# ifconfig -a
eth0      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: xxxx::xxx:xxxx:xxxx:xxxx/xx Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:246 errors:0 dropped:0 overruns:0 frame:0
          TX packets:249 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:23939 (23.3 KiB)  TX bytes:33390 (32.6 KiB)

eth0:0    Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:192.168.0.100  Bcast:192.168.0.255  Mask:255.255.255.255
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth2      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:83.26.136.115  Bcast:83.26.136.255  Mask:255.255.255.0
          inet6 addr: xxxx::xxx:xxxx:xxxx:xxxx/xx Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:26 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3086 (3.0 KiB)  TX bytes:2016 (1.9 KiB)
          Interrupt:11 Base address:0x1400 

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:241 errors:0 dropped:0 overruns:0 frame:0
          TX packets:241 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:25524 (24.9 KiB)  TX bytes:25524 (24.9 KiB)

Kod: Zaznacz cały

limes:~# dpkg -l | grep resolvconf
limes:~# dpkg -l | grep resolv
rc  libc-ares1                                               1.5.1-0                         library for asyncronous name resolves
ii  libc-ares2                                               1.5.2-4                         library for asyncronous name resolves
ii  winbind                                                  2:3.2.5-4lenny13                service to resolve user and group informatio


Niemniej jednak, jak dla mnie istotne jest to co podaje dhcp - zebrane dzięki dhcpdump:

Kod: Zaznacz cały

limes:~# cat dhcpdump 
  TIME: 2010-11-25 20:55:03.007
    IP: 0.0.0.0 (0:30:84:88:a4:b6) > 255.255.255.255 (ff:ff:ff:ff:ff:ff)
    OP: 1 (BOOTPREQUEST)
 HTYPE: 1 (Ethernet)
  HLEN: 6
  HOPS: 0
   XID: a2ddec0c
  SECS: 0
 FLAGS: 0
CIADDR: 0.0.0.0
YIADDR: 0.0.0.0
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 00:30:84:88:a4:b6:00:00:00:00:00:00:00:00:00:00
 SNAME: .
 FNAME: .
OPTION:  53 (  1) DHCP message type         1 (DHCPDISCOVER)
OPTION:  50 (  4) Request IP address        83.29.191.72
OPTION:  55 ( 13) Parameter Request List      1 (Subnet mask)
					     28 (Broadcast address)
					      2 (Time offset)
					      3 (Routers)
					     15 (Domainname)
					      6 (DNS server)
					    119 (Domain Search)
					     12 (Host name)
					     44 (NetBIOS name server)
					     47 (NetBIOS scope)
					     26 (Interface MTU)
					    121 (Classless Static Route)
					    249 (MSFT - Classless route)
					    
---------------------------------------------------------------------------

  TIME: 2010-11-25 20:55:03.021
    IP: 192.168.1.1 (0:26:ed:92:93:54) > 83.29.191.72 (0:30:84:88:a4:b6)
    OP: 2 (BOOTPREPLY)
 HTYPE: 1 (Ethernet)
  HLEN: 6
  HOPS: 0
   XID: a2ddec0c
  SECS: 0
 FLAGS: 0
CIADDR: 0.0.0.0
YIADDR: 83.29.191.72
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 00:30:84:88:a4:b6:00:00:00:00:00:00:00:00:00:00
 SNAME: .
 FNAME: .
OPTION:  53 (  1) DHCP message type         2 (DHCPOFFER)
OPTION:  54 (  4) Server identifier         192.168.1.1
OPTION:  51 (  4) IP address leasetime      30 (30s)
OPTION:   1 (  4) Subnet mask               255.255.255.0
OPTION:   3 (  4) Routers                   83.1.4.3
OPTION:   6 (  4) DNS server                194.204.152.34
OPTION:  15 (  4) Domainname                Home
---------------------------------------------------------------------------

  TIME: 2010-11-25 20:55:03.023
    IP: 0.0.0.0 (0:30:84:88:a4:b6) > 255.255.255.255 (ff:ff:ff:ff:ff:ff)
    OP: 1 (BOOTPREQUEST)
 HTYPE: 1 (Ethernet)
  HLEN: 6
  HOPS: 0
   XID: a2ddec0c
  SECS: 0
 FLAGS: 0
CIADDR: 0.0.0.0
YIADDR: 0.0.0.0
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 00:30:84:88:a4:b6:00:00:00:00:00:00:00:00:00:00
 SNAME: .
 FNAME: .
OPTION:  53 (  1) DHCP message type         3 (DHCPREQUEST)
OPTION:  54 (  4) Server identifier         192.168.1.1
OPTION:  50 (  4) Request IP address        83.29.191.72
OPTION:  55 ( 13) Parameter Request List      1 (Subnet mask)
					     28 (Broadcast address)
					      2 (Time offset)
					      3 (Routers)
					     15 (Domainname)
					      6 (DNS server)
					    119 (Domain Search)
					     12 (Host name)
					     44 (NetBIOS name server)
					     47 (NetBIOS scope)
					     26 (Interface MTU)
					    121 (Classless Static Route)
					    249 (MSFT - Classless route)
					    
---------------------------------------------------------------------------

  TIME: 2010-11-25 20:55:03.051
    IP: 192.168.1.1 (0:26:ed:92:93:54) > 83.29.191.72 (0:30:84:88:a4:b6)
    OP: 2 (BOOTPREPLY)
 HTYPE: 1 (Ethernet)
  HLEN: 6
  HOPS: 0
   XID: a2ddec0c
  SECS: 0
 FLAGS: 0
CIADDR: 0.0.0.0
YIADDR: 83.29.191.72
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 00:30:84:88:a4:b6:00:00:00:00:00:00:00:00:00:00
 SNAME: .
 FNAME: .
OPTION:  53 (  1) DHCP message type         5 (DHCPACK)
OPTION:  54 (  4) Server identifier         192.168.1.1
OPTION:  51 (  4) IP address leasetime      30 (30s)
OPTION:   1 (  4) Subnet mask               255.255.255.0
OPTION:   3 (  4) Routers                   83.1.4.3
OPTION:   6 (  4) DNS server                194.204.152.34
OPTION:  15 (  4) Domainname                Home
---------------------------------------------------------------------------

  TIME: 2010-11-25 20:55:16.001
    IP: 83.29.191.72 (0:30:84:88:a4:b6) > 192.168.1.1 (0:26:ed:92:93:54)
    OP: 1 (BOOTPREQUEST)
 HTYPE: 1 (Ethernet)
  HLEN: 6
  HOPS: 0
   XID: a2ddec0c
  SECS: 0
 FLAGS: 0
CIADDR: 83.29.191.72
YIADDR: 0.0.0.0
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 00:30:84:88:a4:b6:00:00:00:00:00:00:00:00:00:00
 SNAME: .
 FNAME: .
OPTION:  53 (  1) DHCP message type         3 (DHCPREQUEST)
OPTION:  55 ( 13) Parameter Request List      1 (Subnet mask)
					     28 (Broadcast address)
					      2 (Time offset)
					      3 (Routers)
					     15 (Domainname)
					      6 (DNS server)
					    119 (Domain Search)
					     12 (Host name)
					     44 (NetBIOS name server)
					     47 (NetBIOS scope)
					     26 (Interface MTU)
					    121 (Classless Static Route)
					    249 (MSFT - Classless route)
					    
---------------------------------------------------------------------------

  TIME: 2010-11-25 20:55:16.014
    IP: 192.168.1.1 (0:26:ed:92:93:54) > 83.29.191.72 (0:30:84:88:a4:b6)
    OP: 2 (BOOTPREPLY)
 HTYPE: 1 (Ethernet)
  HLEN: 6
  HOPS: 0
   XID: a2ddec0c
  SECS: 0
 FLAGS: 0
CIADDR: 83.29.191.72
YIADDR: 83.29.191.72
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 00:30:84:88:a4:b6:00:00:00:00:00:00:00:00:00:00
 SNAME: .
 FNAME: .
OPTION:  53 (  1) DHCP message type         5 (DHCPACK)
OPTION:  54 (  4) Server identifier         192.168.1.1
OPTION:  51 (  4) IP address leasetime      30 (30s)
OPTION:   1 (  4) Subnet mask               255.255.255.0
OPTION:   3 (  4) Routers                   83.1.4.3
OPTION:   6 (  4) DNS server                194.204.152.34
OPTION:  15 (  4) Domainname                Home
---------------------------------------------------------------------------

  TIME: 2010-11-25 20:55:32.002
    IP: 83.29.191.72 (0:30:84:88:a4:b6) > 192.168.1.1 (0:26:ed:92:93:54)
    OP: 1 (BOOTPREQUEST)
 HTYPE: 1 (Ethernet)
  HLEN: 6
  HOPS: 0
   XID: a2ddec0c
  SECS: 0
 FLAGS: 0
CIADDR: 83.29.191.72
YIADDR: 0.0.0.0
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 00:30:84:88:a4:b6:00:00:00:00:00:00:00:00:00:00
 SNAME: .
 FNAME: .
OPTION:  53 (  1) DHCP message type         3 (DHCPREQUEST)
OPTION:  55 ( 13) Parameter Request List      1 (Subnet mask)
					     28 (Broadcast address)
					      2 (Time offset)
					      3 (Routers)
					     15 (Domainname)
					      6 (DNS server)
					    119 (Domain Search)
					     12 (Host name)
					     44 (NetBIOS name server)
					     47 (NetBIOS scope)
					     26 (Interface MTU)
					    121 (Classless Static Route)
					    249 (MSFT - Classless route)
					    
---------------------------------------------------------------------------

  TIME: 2010-11-25 20:55:32.017
    IP: 192.168.1.1 (0:26:ed:92:93:54) > 83.29.191.72 (0:30:84:88:a4:b6)
    OP: 2 (BOOTPREPLY)
 HTYPE: 1 (Ethernet)
  HLEN: 6
  HOPS: 0
   XID: a2ddec0c
  SECS: 0
 FLAGS: 0
CIADDR: 83.29.191.72
YIADDR: 83.29.191.72
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 00:30:84:88:a4:b6:00:00:00:00:00:00:00:00:00:00
 SNAME: .
 FNAME: .
OPTION:  53 (  1) DHCP message type         5 (DHCPACK)
OPTION:  54 (  4) Server identifier         192.168.1.1
OPTION:  51 (  4) IP address leasetime      30 (30s)
OPTION:   1 (  4) Subnet mask               255.255.255.0
OPTION:   3 (  4) Routers                   83.1.4.3
OPTION:   6 (  4) DNS server                194.204.152.34
OPTION:  15 (  4) Domainname                Home
---------------------------------------------------------------------------
dhcp zatem podaje "routers", pytanie dlaczego nie jest prawidłowo ustawiane na moim debianie.
fnmirk
Senior Member
Posty: 8321
Rejestracja: 03 grudnia 2007, 06:37

Post autor: fnmirk »

Kod: Zaznacz cały

cat /etc/network/interfaces 

Kod: Zaznacz cały

auto ppp0
iface ppp0 inet ppp
	provider neostrada
	name Speedtouch 330 neo+ 512
Mnie się to nie podoba. Jak mam u siebie aktywny wpis dotyczący ppp0, to inne formy połączenia z internetem u mnie nie działają.

Oraz to:

Kod: Zaznacz cały

# dns-* options are implemented by the resolvconf package, if installed
	dns-nameservers 127.0.0.1
	dns-search hopto.org
Nie masz zainstalowanego i skonfigurowanego pakietu resolvconf to chyba nie jest potrzebny ten wpis.
boskar
Posty: 20
Rejestracja: 20 listopada 2010, 11:01

Post autor: boskar »

ppp0 nie jest aktywne, bo nie ma żadnego urządzenia które by to obsługiwało, no ale niech Ci będzie, w sumie mogę to zakomentować.

A jeśli chodzi o DNS-y - problem na bank nie tutaj leży, pakiety po IP też nie dochodzą, z resztą jak to zakomentuję to i tak się nic nie stanie bo w sumie ten host i tak nigdy nie rozwiązywał poprawnie nazw z domeny, którą sam utrzymuje, ale akurat nie jest mi to do niczego potrzebne.

Dam znać jak przetestuję po zakomentowaniu.

Dodane:
Po modyfikacjach oczywiście bez zmian.

Kod: Zaznacz cały

limes:~# cat /etc/resolv.conf 
domain Home
search Home
nameserver 194.204.152.34

Kod: Zaznacz cały

limes:~# ping 194.204.152.34
connect: Network is unreachable

Kod: Zaznacz cały

limes:~# cat /etc/network/interfaces 
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet static
	address 192.168.0.1
	netmask 255.255.255.0
#	network 192.168.0.0
#	broadcast 192.168.0.255
#	# dns-* options are implemented by the resolvconf package, if installed
#	dns-nameservers 127.0.0.1
#	dns-search hopto.org

#auto eth0:0
#iface eth0:0 inet static
#	address 192.168.0.100
#	netmask 255.255.255.255

#auto ppp0
#iface ppp0 inet ppp
#	provider neostrada
#	name Speedtouch 330 neo+ 512

#auto eth1
#iface eth1 inet static
#	wireless-essid boskarnet
#	wireless-mode ad-hoc
#	wireless-key s:azsxdcfvgbhnj
#	address 10.1.1.1
#	netmask 255.0.0.0
#	network 10.0.0.0
#	broadcast 10.255.255.255
#	wireless-mode ad-hoc
#	wireless-key s:<wycięto>
#	wireless-essid boskarnet

auto eth2
iface eth2 inet dhcp
#post-up route add default eth2
#dns-nameservers 192.168.1.1
#broadcast 192.168.1.255
#network 192.168.1.0
#hwaddress ether 00:E0:7D:93:32:E2

#auto br0
#iface br0 inet static 
#	address 192.168.0.1
#	netmask 255.255.0.0
#	broadcast 192.168.0.255
#	pre-up ifconfig eth0 down
#	pre-up ifconfig eth1 down
#	pre-up brctl addbr br0
#	pre-up brctl addif br0 eth0
#	pre-up brctl addif br0 eth1
#	pre-up ifconfig eth0 up 0.0.0.0
#	pre-up ifconfig eth1 up 0.0.0.0
#	pre-up iwconfig eth1 mode ad-hoc
#	pre-up iwconfig eth1 channel 11
#	pre-up iwconfig eth1 essid boskarnet
#	pre-up iwconfig eth1 key s:<wycięto>
#	post-down ifconfig eth0 down
#	post-down ifconfig eth1 down
#	post-down brctl delif br0 eth0
#	post-down brctl delif br0 eth1
#	post-down brctl delbr br0

Kod: Zaznacz cały

limes:~# ifconfig
eth0      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: xxxx::xxx:xxx:xxxx:xxx/xx Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:208 errors:0 dropped:0 overruns:0 frame:0
          TX packets:220 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:17035 (16.6 KiB)  TX bytes:31893 (31.1 KiB)

eth2      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:83.10.147.10  Bcast:83.10.147.255  Mask:255.255.255.0
          inet6 addr: xxxx::xxx:xxxx:xxxx:xxx/xx Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1796 (1.7 KiB)  TX bytes:2238 (2.1 KiB)
          Interrupt:11 Base address:0x1400 

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:231 errors:0 dropped:0 overruns:0 frame:0
          TX packets:231 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:24338 (23.7 KiB)  TX bytes:24338 (23.7 KiB)

Kod: Zaznacz cały

limes:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
83.10.147.0     *               255.255.255.0   U     0      0        0 eth2
localnet        *               255.255.255.0   U     0      0        0 eth0
224.0.0.0       *               240.0.0.0       U     0      0        0 eth0

Kod: Zaznacz cały

limes:~# routel
         target            gateway          source    proto    scope    dev tbl
    83.10.147.0 24                    83.10.147.10   kernel     link   eth2 
    192.168.0.0 24                     192.168.0.1   kernel     link   eth0 
      224.0.0.0 4                                               link   eth0 
    83.10.147.0          broadcast    83.10.147.10   kernel     link   eth2 local
  192.168.0.255          broadcast     192.168.0.1   kernel     link   eth0 local
127.255.255.255          broadcast       127.0.0.1   kernel     link     lo local
    192.168.0.1              local     192.168.0.1   kernel     host   eth0 local
  83.10.147.255          broadcast    83.10.147.10   kernel     link   eth2 local
    192.168.0.0          broadcast     192.168.0.1   kernel     link   eth0 local
   83.10.147.10              local    83.10.147.10   kernel     host   eth2 local
      127.0.0.0          broadcast       127.0.0.1   kernel     link     lo local
      127.0.0.1              local       127.0.0.1   kernel     host     lo local
      127.0.0.0 8            local       127.0.0.1   kernel     host     lo local
         fe80:: 64                                                     eth0 
         fe80:: 64                                                     eth2 
        default        unreachable                     none              lo unspec
            ::1                 ::                     none              lo local
fe80::230:84ff:fe88:a4b6                 ::                     none              lo local
fe80::280:5fff:fed7:e30b                 ::                     none              lo local
         ff00:: 8                                                      eth0 local
         ff00:: 8                                                      eth2 local
        default        unreachable                     none              lo unspec
fnmirk
Senior Member
Posty: 8321
Rejestracja: 03 grudnia 2007, 06:37

Post autor: fnmirk »

Spróbuj może schematycznie rozrysować układ tej sieci.
boskar
Posty: 20
Rejestracja: 20 listopada 2010, 11:01

Post autor: boskar »

Kod: Zaznacz cały

            ADSL-neostrada
                 ^
                 | RJ11 POTS
                 v
         ZTE ZXDSL 831All Combo 
                 ^
                 |
                 | ethernet 
                 v
                eth2
                 | dhclient
              limes (Debian router)
                 | dhcpd
                eth0
    laptop2      ^
      ^          |
      |          v
   WAP54G<---przełącznik ---> klient1, po kablu
      |
      v
    laptop1
Niegdyś był jeszcze eth1, zanim sprawiłem sobie punkt dostępowy (AP) z prawdziwego zdarzenia, stąd te kombinacje w pliku interfaces, zakomentowane.

Warto dodać, że klient1 (Debian Sid bez NM) podpięty po kablu bezpośrednio to combo zte też nie uwzględnia info o routingu, a na laptop1 (Debian Sid z NM) wszystko działa poprawnie.
ODPOWIEDZ