Upload
acacio-oliveira
View
23
Download
2
Embed Size (px)
Citation preview
Core
Lin
ux fo
r Red
Hat
and
Fed
ora
lear
ning
und
er G
NU
Fre
e D
ocum
enta
tion
Lice
nse
- Co
pyle
ft (c
) Acá
cio
Oliv
eira
201
2E
very
one
is p
erm
itted
to
copy
and
dis
trib
ute
verb
atim
cop
ies
of t
his
licen
se d
ocum
ent,
cha
ngin
g is
allo
wed
Linux Essenciais and System Administration
Core
Lin
ux fo
r Red
Hat
and
Fed
ora
lear
ning
und
er G
NU
Fre
e D
ocum
enta
tion
Lice
nse
- Co
pyle
ft (c
) Acá
cio
Oliv
eira
201
2E
very
one
is p
erm
itted
to
copy
and
dis
trib
ute
verb
atim
cop
ies
of t
his
licen
se d
ocum
ent,
cha
ngin
g is
allo
wed
Key Knowledge Areas
Connecting machines and resources
Networking Configuration and Services
Networking
Terms and Utilitiesnetwork layerstcp/udpethernetportstcp/ipaddressingipv4ipv6subnet classessubnet maskscidr
2
Core
Lin
ux fo
r Red
Hat
and
Fed
ora
lear
ning
und
er G
NU
Fre
e D
ocum
enta
tion
Lice
nse
- Co
pyle
ft (c
) Acá
cio
Oliv
eira
201
2E
very
one
is p
erm
itted
to
copy
and
dis
trib
ute
verb
atim
cop
ies
of t
his
licen
se d
ocum
ent,
cha
ngin
g is
allo
wed
Main approaches to configuring a machine for network
3
Configuring a machine for network access:
Static configurationDynamic configuration
Static configuration uses set parameters for configuration, which is known by machine and network and never changes. - Generally used with servers.
Dynamic configuration configures network machines on fly where a service on network provides all configuration parameters to a machine when it joins the network.- Generally used with workstations.
Network Configuration
Core
Lin
ux fo
r Red
Hat
and
Fed
ora
lear
ning
und
er G
NU
Fre
e D
ocum
enta
tion
Lice
nse
- Co
pyle
ft (c
) Acá
cio
Oliv
eira
201
2E
very
one
is p
erm
itted
to
copy
and
dis
trib
ute
verb
atim
cop
ies
of t
his
licen
se d
ocum
ent,
cha
ngin
g is
allo
wed
Dynamic configuration
4
Dynamic configuration is the easiest to use.
The machine just needs to set up it’s interfaces with the DHCP protocol.DHCP: Dynamic Host Configuration Protocol.
•A lease is obtained from the DHCP server, providing all network configuration details for the client. •The lease expires after some amount of time and is renewed by the client to maintain network access.
Network Configuration
Core
Lin
ux fo
r Red
Hat
and
Fed
ora
lear
ning
und
er G
NU
Fre
e D
ocum
enta
tion
Lice
nse
- Co
pyle
ft (c
) Acá
cio
Oliv
eira
201
2E
very
one
is p
erm
itted
to
copy
and
dis
trib
ute
verb
atim
cop
ies
of t
his
licen
se d
ocum
ent,
cha
ngin
g is
allo
wed
Static configuration
5
Static configuration requires four configuration parameters in order to allow full network functionality:
•IP Address•Netmask•Default Gateway or Router•DNS Server(s)
Network Configuration
Core
Lin
ux fo
r Red
Hat
and
Fed
ora
lear
ning
und
er G
NU
Fre
e D
ocum
enta
tion
Lice
nse
- Co
pyle
ft (c
) Acá
cio
Oliv
eira
201
2E
very
one
is p
erm
itted
to
copy
and
dis
trib
ute
verb
atim
cop
ies
of t
his
licen
se d
ocum
ent,
cha
ngin
g is
allo
wed
Static configuration
6
Network Configuration
First two components of static configuration are IP address and netmask.These provide LAN-level accessifconfig Network Interface configuration toolEx: ifconfig eth0 192.168.0.100 netmask 255.255.255.0
Third configuration parameter is the default gateway.Provides access to inter-networking, or moving from just the local LAN to other LAN’sroute Kernel routing table tool - Displays and manipulates network routing tableEx: route add default gw 192.168.0.1
Fourth configuration info is List of IP addresses which provide the DNS service. Allowing name to IP address mapping To configure add name-server lines to /etc/resolv.confEx: nameserver 192.168.7.15- Also consider /etc/nsswitch.conf
Core
Lin
ux fo
r Red
Hat
and
Fed
ora
lear
ning
und
er G
NU
Fre
e D
ocum
enta
tion
Lice
nse
- Co
pyle
ft (c
) Acá
cio
Oliv
eira
201
2E
very
one
is p
erm
itted
to
copy
and
dis
trib
ute
verb
atim
cop
ies
of t
his
licen
se d
ocum
ent,
cha
ngin
g is
allo
wed
Static configuration
7
Network Configuration
ifconfig and route directly manipulate the running kernel, and are not permanent changes to the system. After a reboot, changes will be lost.
To make IP address, netmask and gateway changes permanent edit two config files:
•/etc/sysconfig/network-services/ifcfg-eth0•/etc/sysconfig/network
Core
Lin
ux fo
r Red
Hat
and
Fed
ora
lear
ning
und
er G
NU
Fre
e D
ocum
enta
tion
Lice
nse
- Co
pyle
ft (c
) Acá
cio
Oliv
eira
201
2E
very
one
is p
erm
itted
to
copy
and
dis
trib
ute
verb
atim
cop
ies
of t
his
licen
se d
ocum
ent,
cha
ngin
g is
allo
wed
Services
8
Network Services
Services: hundreds, thousands of different network services. each individual service might have one or a dozen apps which can provide the service.Ex: HTTP, SMTP, SSH, FTP, MySQL
HTTP Hypertext Transfer Protocol: Used to ship webpages and associated files across network. Servers: Apache, IIS, lighttpd
SMTP Simple Mail Transfer Protocol: Delivers email messages. Popular Servers: qmail, sendmail, postfix, exchange
SSH Secure Shell: Encrypted remote shell access. Server: OpenSSH
FTP File Transfer Protocol: Used to move files around the network. Popular Servers: wu-ftpd, vsftpd
MySQL: Powerful open-source relational database management systemMySQL is the server and the only one - service is defined and implemented by the application
Core
Lin
ux fo
r Red
Hat
and
Fed
ora
lear
ning
und
er G
NU
Fre
e D
ocum
enta
tion
Lice
nse
- Co
pyle
ft (c
) Acá
cio
Oliv
eira
201
2E
very
one
is p
erm
itted
to
copy
and
dis
trib
ute
verb
atim
cop
ies
of t
his
licen
se d
ocum
ent,
cha
ngin
g is
allo
wed
Fim de sessão
9