ADSL
Nikolaos Korkakakis
korkakak at gmail.com
Sat Nov 18 19:46:43 EET 2006
On 11/18/06, Nikolaos Korkakakis <korkakak at gmail.com> wrote:
> periptwsh a)
> exeis adsl router
> a1) me built in switch
> bazeis ta pc se idio subnet (px PC1 IP 10.10.1.2 subnet
> 255.255.255.224 kai gateway thn dieu8unsh pou exeis apodosei sto
> router, kai omoiws prateis sto PC2 apla allazeis IP (px 10.10.1.3 same
> subnet + gateway) Ru8mizeis to router wste to local interface na
> bgazei IP pou na peftei sto idio subnet (px IP 10.10.1.1 sub
> 255.255.225.224)
>
> a2) xwris built in switch (to PC1 exei 2 ethernet ifs kai exuphretei kai to PC2)
> ru8mizeis to if1 tou PC1 na peftei panw sto idio subnet me to router
> (px 10.10.1.1/24 to router kai 10.10.1.2/24 to PC1) ru8mizeis thn
> deuterh ethernet sto PC1 na exei diaforetiko subnet (px 10.10.2.1/24)
> kai thn kartoula sto PC2 na trexei sto idio subnet px 10.10.2.2/24.
> energopoieis to ip forwarding sta windows ( opws leei h mama m$ edw
> http://support.microsoft.com/kb/230082) Enalaktika mporeis na
> agoraseis ena exwteriko switch kai na akolou8hseis ta bhmata tou a1
>
> periptwsh b)
> exeis adsl bridge
> kaneis oti proteinete sto a2 xwris na setareis tpt allo para monon to
> if pou sundeete to PC1 me to PC2 kai na energopoihseis to TCP/IP
> forwarding.
>
> TCP/IP forwarding mporeis na kaneis kai apo mia mpourda pou leei h m$
> se ena wizard shared network connection h kati tetoio
>
Epishs na anaferw oti ola ta parapanw ginontai kai se linux. Px gia
energopoihsh tou ip forwarding kaneis
eite xuma sto filesystem:
#cat /proc/sys/net/ipv4/ip_forward (an value = 0 den einai enabled)
#echo 1 > /proc/sys/net/ipv4/ip_forward
eite me to sysctl
#sysctl net.ipv4.ip_forward (an value = 0 den einai enabled)
#sysctl -w net.ipv4.ip_forward=1
Ta parapanw den apo8hkeuoun tis ru8miseis prepei na to kaneis ka8e
fora pou kaneis restart. Mporeis apo to arxeio sysctl.conf (ston
katalogo /etc) na peira3eis tis aparaithtes ru8miseis wste na douleuei
ka8e fora. (peirazeis to entry -> net.ipv4.ip_forward = 1 kaneis kai
restart (to service: #sysctl -p /etc/sysctl.conf ) kai eisai etoimos )
telos prepei na baleis ena default route sto PC2 pou sundeete mesw tou
PC1 sto DSL modem/router
#route add default gw 10.10.1.5
(upo8etoume oti to PC1 kai to Mod/Rout milane metaxu tous sto subnet
10.10.1.0/30 me to 10.10.1.1 na einai h IP tou modem/router enw to
10.10.1.2 na einai h IP tou PC1. Pc1 <-> PC2 milane sto sub
10.10.1.5/30 me PC1 IP 10.10.1.5/30 kai PC2 IP 10.10.1.6/30)
An to Modem Router paizei mono san bridge isws na xreiastei na baleis
kai NAT sto interface pou milaei me to Modem/router (eth0 sto PC1 dld)
etsi
# iptables -A POSTROUTING -t nat -o eth0 -s 10.10.1.2/30 -d 0/0 -j MASQUERADE
# iptables -A FORWARD -t filter -o eth0 -m state --state
NEW,ESTABLISHED,RELATED -j ACCRPT
An kai twra pou diabazw ta parapanw den einai oute kan ena howto,
apoteloun skepseis xwris ta3h kai eirmo kai elpizw na se boh8oun para
na se mperdeuoun. GIa otidhpote just ask
:-)
--
-
Undergraduate Student of Department of Computer Engineering and
Informatics ( http://www.ceid.upatras.gr )
WARNING: posting to or from gmail might disclose sensitive information
to people you don't entirely trust. For safe, private communication use
korkarak (at) ceid (dot) upatras (dot) gr , and my public PGP key from
http://students.ceid.upatras.gr/~korkakak/mykey
More information about the Linux-greek-users
mailing list