53
pinguindocs Documentation Release 0.0.1 Naufal Dzulfiqar Anwar July 09, 2016

Release 0.0.1 Naufal Dzulfiqar Anwar

  • Upload
    others

  • View
    7

  • Download
    0

Embed Size (px)

Citation preview

1 Networking 3 1.1 Network Simulator 2 Installation (NS2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.1.1 1. NS 2.35 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.1.2 2. NS 2.34 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.1.3 3. NS 2.33 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 1.1.4 4. NS 2.32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 1.1.5 5. NS 2.31 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
1.2 CISCO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 1.2.1 Subnetting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 1.2.2 EIGRP - network advertise with wildcard . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 1.2.3 Basic OSPF Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 1.2.4 Dynamic Host Configuration Protocol (DHCP) . . . . . . . . . . . . . . . . . . . . . . . . 28 1.2.5 Routing Information Protocol (RIP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 1.2.6 Static Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 1.2.7 Hot Standby Router Protocol (HSRP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 1.2.8 Virtual Router Redundancy Protocol (VRRP) . . . . . . . . . . . . . . . . . . . . . . . . . 29 1.2.9 Gateway Load Balancing Protocol (GLBP) . . . . . . . . . . . . . . . . . . . . . . . . . . 29 1.2.10 Virtual LAN (VLAN) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 1.2.11 MPLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
1.3 JUNIPER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 1.3.1 Lifecycle of configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 1.3.2 Configuration Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 1.3.3 Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 1.3.4 Routing Policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 1.3.5 Firewall Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
2 Operating System 37 2.1 File Transfer Protocol (FTP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 2.2 Domain Name System (DNS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 2.3 OwnCloud . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 2.4 Live Migration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 2.5 Load-Balancing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 2.6 OpenNebula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 2.7 OpenStack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 2.8 Web Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 2.9 Network Time Protocol (NTP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
3 Web Programming 45
ii
Divided into three division :
3
Documented by :
• Code Name : NDA • Date : 12/18/2015 • Mail : [email protected]
Ns is a discrete event simulator targeted at networking research. Ns provides substantial support for simulation of TCP, routing, and multicast protocols over wired and wireless (local and satellite) networks.[1]
You can download ns2 files from http://sourceforge.net/projects/nsnam/files/allinone/. In this documenta- tion we use Ubuntu 10.04 32bit as operating system. You can download iso file from http://old- releases.ubuntu.com/releases/lucid/ubuntu-10.04-desktop-i386.iso
1.1.1 1. NS 2.35
apt-get update
• Install packages
cd /home/cnc/ns-allinone-2.35
Note: Check your own path, in this documentation we use /home/cnc/
• Install ns2
• Edit bashrc
nano ~/.bashrc
pinguindocs Documentation, Release 0.0.1
ns ns-simple.tcl
apt-get update
• Install packages
10 Chapter 1. Networking
• Move to ns2 directory
cd /home/cnc/ns-allinone-2.34
Note: Check your own path, in this documentation we use /home/cnc/
• Install ns2
1.1. Network Simulator 2 Installation (NS2) 11
pinguindocs Documentation, Release 0.0.1
12 Chapter 1. Networking
apt-get update
• Install packages
pinguindocs Documentation, Release 0.0.1
• Open file in otcl-1.13/configure
• Patch for NAM [2]
14 Chapter 1. Networking
cd /home/cnc/ns-allinone-2.33
Note: Check your own path, in this documentation we use /home/cnc/
• Install ns2
pinguindocs Documentation, Release 0.0.1
• Edit bashrc
nano ~/.bashrc
ns ns-simple.tcl
apt-get update
• Install packages
• Patch for NAM [2]
18 Chapter 1. Networking
patch -p0 < ./tk-8.4-lastevent.patch
Note: Check your own path, in this documentation we use /home/cnc/
• Move to ns2 directory
1.1. Network Simulator 2 Installation (NS2) 19
pinguindocs Documentation, Release 0.0.1
20 Chapter 1. Networking
apt-get update
• Install packages
pinguindocs Documentation, Release 0.0.1
• Open file in otcl-1.13/configure
• Patch for NAM [2]
22 Chapter 1. Networking
cd /home/cnc/ns-allinone-2.31
Note: Check your own path, in this documentation we use /home/cnc/
• Install ns2
1.1. Network Simulator 2 Installation (NS2) 23
pinguindocs Documentation, Release 0.0.1
ns ns-simple.tcl
• What you need to remember
/24 = 256 /25 = 128 /26 = 64 /27 = 32 /28 = 16 /29 = 8 /30 = 4 /31 = 2 /32 = 1
• Location
pinguindocs Documentation, Release 0.0.1
C = /24 - /32 12345678.12345678.12345678.XXXXXXXX
When it's located in A or B, shift it to C ex = /18 shift to /26 (just shift it by 8)
/9 shift to /17 (Still located in B), shift to /25
• IP
• Question
1. How many IP in subnet ? 2. Subnet Mask ? 3. IP Network, Broadcast, and Range IP Host ?
• Answer for 10.10.10.50/30
/30 = 4 /30 located in C 1. How many IP in subnet ? 4 2. Subnet Mask ? 256 - 4 = 255.255.255.252 3. IP Network & Broadcast /30 = 4
Because its 4 then : 0 - 3 4 - 7
.
IP Network = 10.10.10.48 IP Broadcast = 10.10.10.51 IP Host = 10.10.10.48 - 10.10.10.50- Answer for 10.10.10.50/30
• Answer for 20.20.20.50/28
/28 = 16 /28 located in C 1. How many IP in subnet ? 16 2. Subnet Mask ? 256 - 16 = 255.255.255.240 3. IP Network & Broadcast /28 = 16
Because its 16 then : 0 - 15 16 - 31
.
IP Network = 20.20.20.48 IP Broadcast = 20.20.20.63 IP Host = 20.20.20.49 - 20.20.20.62
26 Chapter 1. Networking
pinguindocs Documentation, Release 0.0.1
• Answer for 30.30.30.30/19
/19 = 32 (shifted /19 + 8 = /27) /29 located in B 1. How many IP in subnet ? 32 x 256 = 8192 2. Subnet Mask ? 256 - 32 = 255.255.224.0 3. IP Network & Broadcast /19 = 32
Because its 32 then : 0 - 31 ----> .30 located between 0 - 31
IP Network = 30.30.0.0 IP Broadcast = 30.30.31.255 IP Host = 30.30.0.1 - 30.30.31.254
• Answer for 40.40.40.40/13
/13 = 8 (shifted /13 + 8 = /21 + 8 = /29) /13 located in A 1. How many IP in subnet ? 8 x 256 x 256 = 524288 2. Subnet Mask ? 256 - 8 = 255.248.0.0 3. IP Network & Broadcast /13 = 8
Because its 8 then : 0 - 7 8 - 15
.
IP Network = 40.40.0.0 IP Broadcast = 40.47.255.255 IP Host = 40.40.0.1 - 40.47.255.254
Sources :
• ID-Networkers
TOPOLOGY
images/eigrp.png
R5#conf R5(config)#int lo99 R5(config-if)#ip add 15.15.0.1 255.255.255.255
• Network advertise with no wildcard
1.2. CISCO 27
• if we dont use wildcard mask
show run | s eigrp 100 !
! router eigrp 100 network 15.0.0.0 !
R1#sh ip ro 15.15.0.1 Routing entry for 15.15.0.1/32 Known via "eigrp 100", distance 90, metric 156160, type internal Redistributing via eigrp 100 Last update from 15.15.15.5 on FastEthernet4/0, 00:00:03 ago Routing Descriptor Blocks:
* 15.15.15.5, from 15.15.15.5, 00:00:03 ago, via FastEthernet4/0 Route metric is 156160, traffic share count is 1 Total delay is 5100 microseconds, minimum bandwidth is 100000 Kbit Reliability 255/255, minimum MTU 1500 bytes Loading 1/255, Hops 1
R1#ping 15.15.0.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 15.15.0.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 28/45/52 ms
• Use wildcard
R5#conf R5(config)#router eigrp 100 R5(config-router)#network 15.15.15.5 0.0.0.0
R1#ping 15.15.0.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 15.15.0.1, timeout is 2 seconds: ..... Success rate is 0 percent (0/5)
R1#sh ip ro 15.15.0.1 % Subnet not in table
1.2.3 Basic OSPF Configuration
This chapter 2
This chapter 2
1.2.6 Static Routing
This chapter 2
This chapter 2
This chapter 2
This chapter 2
• Code Name : NDA • Date : 12/17/2015 • Mail : [email protected]
We use VLAN technology when we want to make a several segment for LAN network. VLAN is configured in switch device. We can also make a group for user depends on the need.
In VLAN theres intra-VLAN and inter-VLAN. Intra-VLAN is when communication happens between host in same VLAN-ID. Inter-VLAN is a communication between host in different VLAN-ID. VLAN 1 is the default if you not configure anything on the switch.
In this documentation we use Cisco Packet Tracer for documentation
1.VLAN part 1
1.2. CISCO 29
PC0 ip address
• Do ping to check reachability
After we make sure that they can ping each other, now we make configuration on switch. In this documentation we make vlan topology with VLAN 1 and 2 as an example.
1.2. CISCO 33
• Create VLAN 2 (becasue VLAN 1 already created by default)
Switch(config)# VLAN 2
Switch(config)# int f2/1 Switch(config-if)# switchport mode access Switch(config-if)# switchport access vlan 2
• Make PC2 into VLAN 2 group
Switch(config)# int fa3/1 Switch(config-if)# switchport mode access Switch(config-if)# switchport access vlan 2
Note: Look carefully at your interface, it might be different with this example
• Now try to ping PC in different VLAN-ID, it should be failed.
Sources :
34 Chapter 1. Networking
pinguindocs Documentation, Release 0.0.1
1.3.1 Lifecycle of configuration
37
pinguindocs Documentation, Release 0.0.1
pinguindocs Documentation, Release 0.0.1
Documented by :
• Code Name : NDA • Date : 12/17/2015 • Mail : [email protected]
FTP or File Transfer Protocol is TCP based service. We use FTP to upload or download their files to server. By default FTP use 2 ports, which is port 20 and 21. Port 21 for “command port” and port 20 for “data port”.
In this documentation we use Ubuntu 14.04 as operating system, and vsftpd as ftp server.
• root access
sudo su
apt-get update
• Install vsftpd
adduser cnc
anonymous_enable=NO
local_enable=YES
write_enable=YES
chroot_local_user=YES
sudo chown root:root /home/cnc
sudo mkdir /home/cnc/ftp
• Granting access to user cnc that we created before to access ftp directory
sudo chown cnc:cnc /home/cnc/ftp
• For a test, create a txt file named 1.txt inside /ftp directory, and write as you like, mine was “This is just a test!”
nano /home/cnc/ftp/1.txt
pinguindocs Documentation, Release 0.0.1
• Now you can access your ftp server by opening your web browser and type ftp:// (your ftp server ip)
Note: Login using username and password that we set before
Sources :
• http://www.dedeerik.com/cara-install-dan-konfigurasi-ftp-server-di-ubuntu-vsftpd/
• https://help.ubuntu.com/community/vsftpd
• http://www.slacksite.com/other/ftp.html
DNS
This chapter 2
CHAPTER 3
Web Programming
45
pinguindocs Documentation, Release 0.0.1
CHAPTER 4
1. NS 2.35
2. NS 2.34
3. NS 2.33
4. NS 2.32
5. NS 2.31
Basic OSPF Configuration
Routing Information Protocol (RIP)
Virtual LAN (VLAN)