📄 linuxnetworking.html
字号:
<br><b><DigitalFallout></b> Is this lecture generic to all linux/unix
systens?
<br><b><Edrin></b> hi Matt
<br><b><Ghost_Rider> df: mostly linux</b>
<br><b><Mikkkeee></b> nice to see all the oldies here
<br><b><DigitalFallout></b> Ok
<br><font color="#FF0000">*** Quits: Blue^demoN (Ping timeout)</font>
<br><b><Matt></b> Well, GR's doing such a generally good job, we can
continue :)
<br><font color="#FF0000">*** Quits: __052_- (Quit: Leaving)</font>
<br><b><Ghost_Rider> so we know have working ethernet cards</b>
<br><font color="#FF0000">*** Joins: i1der</font>
<br><font color="#FF0000">*** Parts: _AxE-</font>
<br><b><Ghost_Rider> it's time to setup LAN</b>
<br><font color="#FF0000">*** Joins: Cyberwolf</font>
<br><font color="#FF0000">*** ChanServ sets mode: +o Cyberwolf</font>
<br><b><Cyberwolf></b> hi all
<br><font color="#FF0000">*** Joins: slakka</font>
<br><b><Mikkkeee></b> damn cyber u missed the lecture
<br><font color="#FF0000">*** Joins: Grim_Reaper</font>
<br><b><Mikkkeee></b> just kidding
<br><b><Cyberwolf></b> damn! its crowded in here :))
<br><b><Ghost_Rider> let's check the 1st example of the example.txt
(http://blacksun.box.sk/examples.txt)</b>
<br><b><Ghost_Rider> I'll give you sometime to open the file...</b>
<br><font color="#FF0000">*** Cyberwolf sets mode: +v Serial_Killer</font>
<br><b><Ghost_Rider> ok..it's probably open</b>
<br><b><Ghost_Rider> as you can see we have a direct ethernet-ethernet
card connection..our LAN it's just 2 computers</b>
<br><b><Ghost_Rider> this is the very easy to setup...but let's start
from the beggining</b>
<br><b><Ghost_Rider> since we are talking about private networks</b>
<br><b><Ghost_Rider> we'll use the ips address that are use for private
networks</b>
<br><b><Ghost_Rider> they are 10.0.0.0/8</b>
<br><b><Ghost_Rider> 172.16.0.0/32</b>
<br><b><Ghost_Rider> 172.16.0.0/16 (sorry about this typo)</b>
<br><b><Ghost_Rider> 192.168.0.0/24</b>
<br><font color="#FF0000">*** Quits: PhAzE (Ping timeout)</font>
<br><b><Ghost_Rider> now since we just got 2 computers (the router and
the 2nd computer) we will use the Class C ip address</b>
<br><font color="#FF0000">*** Quits: Megram (Connection reset by peer)</font>
<br><b><Ghost_Rider> so we'll will put the router with ip address 192.168.0.1
and the 2nd computer with ip 192.168.0.2</b>
<br><font color="#FF0000">*** Quits: Jahlin (Quit: Leaving)</font>
<br><b><Ghost_Rider> you might ask why don't we give .0 and .1 or as
someone asked me before why can't we give the .255</b>
<br><b><Ghost_Rider> well .0 and .255 and HOST ID can't be given because
these too addies are special</b>
<br><b><Ghost_Rider> the .0 represents the intire network..and .255
is the broadcast address (When you wanna send something to every computer
on the network)</b>
<br><font color="#FF0000">*** Quits: zwanderer (Quit: Liberae sunt nostrae
cogitationes)</font>
<br><b><Ghost_Rider> so your HOST ID may be > 0 and < 255 but never
= to this 2 values</b>
<br><font color="#FF0000">*** Joins: Megram</font>
<br><font color="#FF0000">*** ChanServ sets mode: +o Megram</font>
<br><b><Ghost_Rider> now that we have this clear (I think)</b>
<br><b><Ghost_Rider> let's setup the ips for them</b>
<br><b><mikestevens></b> actually you can use those, but you need to
do some other stuff with netmasks
<br><font color="#FF0000">*** Joins: Freezer</font>
<br><b><mikestevens></b> they are special in most cases, so its better
to leave them alone
<br><font color="#FF0000">*** Megram sets mode: +v Freezer</font>
<br><b><Ghost_Rider> now...we wanna set the following ips 192.168.0.1
and 192.168.0.2</b>
<br><font color="#FF0000">* Freezer prods megram,ghost,mikkkeee,caboom,wolf,spiderman
and the rest in the tummy</font>
<br><font color="#FF0000">*** Quits: VoidIndex (Quit: Shit on the Quit...)</font>
<br><b><Ghost_Rider> we can do this using the /sbin/ifconfig</b>
<br><b><Mikkkeee></b> hey freezer
<br><b><Ghost_Rider> so as root on the router to give ip 192.168.0.1
we'll do /sbin/ifconfig eth0 192.168.0.1 netmask 255.255.255.0</b>
<br><font color="#FF0000">*** Joins: gUeSt51</font>
<br><font color="#FF0000">*** Joins: hackbitbr</font>
<br><b><Ghost_Rider> doing this should be add an entry to ur routing
table</b>
<br><b><Ghost_Rider> you can check it typing /sbin/route</b>
<br><b><Ghost_Rider> and should be shown an entry besides loopback (127.0.0.1)</b>
<br><font color="#FF0000">*** Joins: H2-0</font>
<br><b><Ghost_Rider> TarcerT: eth0 it's the ethernet card inteface</b>
<br><font color="#FF0000">*** hackbitbr is now known as CoRiNgA</font>
<br><b><Ghost_Rider> but resuming</b>
<br><b><Ghost_Rider> you now should have a route entry for 192.168.0.0
that will have eth0 as interface</b>
<br><font color="#FF0000">*** Quits: Dunceor (Quit: )</font>
<br><b><Ghost_Rider> if this wan't added you have to add it by youself</b>
<br><font color="#FF0000">*** Parts: i1der</font>
<br><b><Ghost_Rider> to do this</b>
<br><b><Ghost_Rider> you do /sbin/route add 192.168.0.0 netmask 255.255.255.0
dev eth0</b>
<br><font color="#FF0000">*** Quits: mephist0 (Ping timeout)</font>
<br><b><Ghost_Rider> now you have a working ethernet card with ip and
routing for other hosts on the same network</b>
<br><b><Ghost_Rider> we repeat the process on the 2nd computer but giving
the ip 192.168.0.2</b>
<br><font color="#FF0000">*** Joins: WackC</font>
<br><font color="#FF0000">*** Quits: b0iler (Ping timeout)</font>
<br><b><Ghost_Rider> we connect both ethernet cards using a RJ-45 entriesand
a crossover cable</b>
<br><b><Ghost_Rider> remember to sue crossover cable when you are doing
a ethernet to ethernet connection</b>
<br><b><Ghost_Rider> sue = use</b>
<br><font color="#FF0000">*** Joins: b0iler</font>
<br><font color="#FF0000">*** Joins: zwanderer</font>
<br><font color="#FF0000">*** Quits: _RooTs_ (Ping timeout)</font>
<br><b><Ghost_Rider> it's now time to test our network</b>
<br><font color="#FF0000">*** OperServ sets mode: +o zwanderer</font>
<br><b><Megram></b> that is if you are connecting 2 nics directly btw...
<br><b><Ghost_Rider> we just ping one box to the other</b>
<br><font color="#FF0000">*** Mikkkeee sets mode: +v zwanderer</font>
<br><b><zwanderer></b> Mikkkeee: nm ;)
<br><b><Mikkkeee></b> heh
<br><b><Ghost_Rider> Megram: yeah..I saied ethernet to ethernet connection</b>
<br><b><Ghost_Rider> no ethernet --> hub/switch--> ethernet</b>
<br><b><Ghost_Rider> not ethernet --> hub/switch--> ethernet</b>
<br><b><Ghost_Rider> like I Was saying we now try to ping each host
and if everything is ok we will receive reply</b>
<br><font color="#FF0000">*** Quits: blues (Ping timeout)</font>
<br><font color="#FF0000">*** Joins: Nightshade</font>
<br><b><Ghost_Rider> if you are connecting more than 2 computers</b>
<br><b><Ghost_Rider> we'll then have something like example 2</b>
<br><font color="#FF0000">*** Joins: crankykid</font>
<br><b><Ghost_Rider> we have the router connected to a HUB and some
computers connected to the HUB, this can also be a switch</b>
<br><b><Ghost_Rider> but for home networking a HUB is just fine</b>
<br><font color="#FF0000">*** Parts: _shady_harrasment_panda-</font>
<br><font color="#FF0000">*** Joins: Obzerver</font>
<br><font color="#FF0000">*** Joins: shady_harrasment_panda</font>
<br><font color="#FF0000">*** ChanServ sets mode: +o shady_harrasment_panda</font>
<br><b><Ghost_Rider> in this situation you won't use crossover cable,
but just what I think it's called RJ connectable cable (at least this is
the pt translation)</b>
<br><b><Ghost_Rider> Megram: those the cable has any specific name?</b>
<br><b><Megram></b> you would use CAT3 or CAT5 patch cable
<br><b><Ghost_Rider></b> ok..thnx for the name input:)
<br><b><Megram></b> but yeah, a standard RJ45 cable would also be used
to describe it
<br><font color="#FF0000">*** Joins: SteeLe</font>
<br><font color="#FF0000">*** ChanServ sets mode: +o SteeLe</font>
<br><b><SteeLe></b> its a renuion :)
<br><font color="#FF0000">*** Joins: muncheese</font>
<br><font color="#FF0000">*** Quits: WackC (Connection reset by peer)</font>
<br><b><Ghost_Rider> so right now you play with ur connection from one
box to another</b>
<br><font color="#FF0000">*** Joins: Apparatus</font>
<br><b><Ghost_Rider> services like ftp, telnet ssh everything you can
think</b>
<br><b><Ghost_Rider> but for now JUST INSIDE UR NETWORK</b>
<br><b><Ghost_Rider> now as you also know we like to give names to our
boxes..like GhostBox or RunAwayBox or GhostLogger...well those are my boxes..lol</b>
<br><font color="#FF0000">*** Quits: Democow (Ping timeout)</font>
<br><font color="#FF0000">*** Joins: blues</font>
<br><b><Ghost_Rider> still if you try from let's say box 1 telnet to
box2name you won't make it</b>
<br><font color="#FF0000">*** Mikkkeee sets mode: +v Apparatus</font>
<br><Ghost_Rider> because box 1 doesn't know the which ip stands for
that name (this is called alias)
<br><Ghost_Rider> so what you have to do is editing a file at /etc/hosts
and add an entry like
<br><Ghost_Rider> 192.168.0.2 BOXNAME
<br><Ghost_Rider> 192.168.0.2 antoehrname
<br><Ghost_Rider> 192.168.0.3 antoehrname
<br><Ghost_Rider> (sorry for the typo again)
<br><b><mikestevens></b> just a general hint
<br><b><Ghost_Rider> and if you want you can also name your network
(network = 192.168.0.0)</b>
<br><b><mikestevens></b> it is better to have the FQDN first
<br><b><Ghost_Rider> edit /etc/networks</b>
<br><b><Ghost_Rider> and add an entry 192.168.0.0 the name you want
for the network</b>
<br><b><Ghost_Rider> mikestevens: wanna add something?</b>
<br><b><mikestevens></b> 24.7.219.28
unixclan.box.sk unixclan
<br><b><mikestevens></b> that is a good example
<br><b><mikestevens></b> alot of networking software likes the FQDN
first
<br><b><mikestevens></b> you can make up a domain name if you like
<br><b><mikestevens></b> and use it internally
<br><b><Ghost_Rider> but mike..u have see that we are working inside
an LAN...</b>
<br><b><Ghost_Rider> well but ok..we can do like BOX.localdomain BOX</b>
<br><b><mikestevens></b> yes
<br><b><Ghost_Rider> and well have FQDN 1st</b>
<br><b><mikestevens></b> yes, that is what is best
<br><b><Ghost_Rider> but even not putting it it will work (at least
everything works on my lan)</b>
<br><b><mikestevens></b> I've had barfing problems with that
<br><b><Ghost_Rider> ok...</b>
<br><font color="#FF0000">*** Ghost_Rider sets mode: -m</font>
<br><b><freeque></b> does all this apply for a wireless network? other
than the cables section of course :-)
<br><b><mikestevens></b> ok
<br><b><Megram></b> essentially
<br><b><mikestevens></b> this has come up
<br><b><mikestevens></b> FQDN stands for Fully Qualified Domain Name
<br><b><mikestevens></b> its the diffrence between www and www.foo.com
<br><font color="#FF0000">*** Quits: blues (Ping timeout)</font>
<br><b><Ghost_Rider> freeque: if the network is TCP/ip based yes</b>
<br><b><mikestevens></b> www is the hostname
<br><b><mikestevens></b> www.foo.com is the FQDN
<br><b><jaxler></b> proceed
<br><b><Ghost_Rider> any more questions?</b>
<br><b><Megram></b> freeque, you will probably need a different module
to the ones GR suggested, but they shouldnt be too hard to find
<br><b><DigitalFallout></b> Ghost_Rider: are you god?
<br><b><freeque></b> lol
<br><font color="#FF0000">*** Joins: Kintege</font>
<br><b><mikestevens></b> yes he is
<br><b><Cyberwolf></b> is a crossover cable very different from a regular
UTP cable?
<br><b><DigitalFallout></b> Hehehe
<br><b><Ghost_Rider></b> freeque: check the IrDA kernel modules
<br><b><Megram></b> Cyberwolf, ish
<br><b><mikestevens></b> Cyberwolf: Crossover is a diffrent Pin setting
<br><b><TracerT></b> wait
<br><b><freeque></b> Ghost_Rider - cheers. u know too much m8 ;-)
<br><b><Megram></b> Cyberwolf, it simply has 1 pair of the wires crossed
over
<br><font color="#FF0000">*** Joins: norton</font>
<br><b><mikestevens></b> UTP stands for Unshielded Twisted Pair
<br><b><Cyberwolf></b> k, thanx guys
<br><b><jimi></b> what is the bnc port of my hub used for?
<br><b><TracerT></b> how the RJ45 cabel loox like?
<br><b><mikestevens></b> STP is shielded Twisted Pair
<br><b><mikestevens></b> (not the band)
<br><b><Ghost_Rider> TracerT: a normal cable</b>
<br><b><Cyberwolf></b> TracerT: like a phone/ISDN plug
<br><b><Ghost_Rider> TracerT: with 4 wires in it</b>
<br><b><Ghost_Rider> hehe</b>
<br><b><Megram></b> jimi, the bnc part is for using bnc/thinnet cabling.
that requires different cabling methods, and i suggest using cat3/5 over
bnc
<br><font color="#FF0000">*** Freezer is now known as ]|MooCow|[</font>
<br><b><jimi></b> oh ok thanks
<br><b><mikestevens></b> Cat 5 can do 100Mbit :-)
<br><b><Ghost_Rider> unless you guys wanna use AUI on ur network:)</b>
<br><b><a|pha[away]></b> 2 pari cable
<br><b><ShellFish></b> i have q.. realy lame but what does the "cat
x" stand for?
<br><font color="#FF0000">*** Joins: codz</font>
<br><b><a|pha[away]></b> pair
<br><b><Megram></b> shell, ok....
<br><b><Megram></b> shellfish, its just used for declaring the capabilities
of the cable. cat 3 is 'category 3', capable of 10mps connections, and
prone to interference
<br><font color="#FF0000">*** Quits: RedShadow (Quit: gtg, bbl)</font>
<br><font color="#FF0000">*** Quits: TracerT (Connection reset by peer)</font>
<br><b><Megram></b> ShellFish, cat 5 is category 5, is capable of 10/100mps
tranfers, and is less prone to interference
<br><font color="#FF0000">*** Quits: Paya (Quit: Leaving)</font>
<br><b><ShellFish></b> ok.. the higher num the better?
<br><b><mikestevens></b> There are new emerging types
<br><b><mikestevens></b> Cat 5e and Cat 6
<br><font color="#FF0000">* ]|MooCow|[ moo's...lots</font>
<br><b><a|pha[away]></b> which are?
<br><b><Megram></b> yeah, tho you will only really encounter cat 3/5
in a small home lan
<br><b><a|pha[away]></b> ..
<br><b><b0iler></b> fast ethernet
<br><b><kIllah|b></b> CAT 5E != CAT5
<br><b><mikestevens></b> They are types for gigabit ethernet
<br><font color="#FF0000">*** Joins: TracerT</font>
<br><b><kIllah|b></b> CAT 5E is allmost same as CAT6
<br><b><mikestevens></b> I'm not sure if there are standards on it yet
<br><b><Megram></b> if i may, we may want to move on with the lecture,
unless there are any main outstanding questions
<br><b><Serial_Killer></b> btw guys how come i know that my network
card is detected by linux
<br><b><ShellFish></b> the reason im askin is that when we have lan
paries everyone shouts a lot about "cat" and i just dont understand.. but
i do now.. tnx
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -