Monday, July 29, 2013

DHCP and Telnet

Dynamic Host  Protocol:

Before the start of the exercise we were grouped in pairs or threes where a person will configure their PC/ linux box to allow the other person's PC (computer A) to connect to the internet via computer B, meaning act as a router and DHCP server.



Here we set the appropriate firewall settings of Computer B


Here we used the the interface names that correspond to the NICS

The exercise was to allow the connecting PC to automatically configure their every time it connects to our network. That is without manually copying the contents of etc/resolv.conf from our PC to his

We editted the file dhcpd.conf and added the lines

default-lease-time 600;
max-lease-time 7200;
option domain-name "intranet.uplb.edu.ph";
option domain-name-servers 172.16.1;

these are global parameters that defines the domain name and addresses of the main server which is present in our etc/resolv.conf file 

 which allowed Computer A's resolv.conf file to be automatically editted with the following domain name and address of the main server


To show that Computer B is configured properly we use the command
cat /var/lib/dhcp3/dhcpd.leases
to view the lease file which contain the IP addresses currently on lease by the DHCP server


Telnet:

The last thing we did was to use the Hypertext transfer protocol using the command

$telnet www.google.com 80

GET /search?=joseph+hermocilla

which to our dismay didn't work as intended as we keep receiving an error message from the browser, after a bit of research from stackoverflow.com we found out the we need a complete address to get the search results which is

GET http://www.google.com/search?q=joseph+hermocilla HTTP/1.0

Answers:
1. iptable command parameters and their descriptions:

-F  used to flush the selected chain and delete all the previous rules one by one
-P  sets the policy for the given target
ACCEPT means let the packet through
INPUT for packets destined  to local sockets  
FORWARD  for packets being routed through the box
OUTPUT for locally-generated packets
-t    This option specifies the packet matching table which the command should operate on. 
nat    This table is consulted when a packet that creates a new connection  is encountered
-A    Append one or more rules to the end of the selected chain
POSTROUTING    for altering packets as they are about to go out
-o Name of an interface via which a packet is going to be sent 
-j This specifies the target of the rule; i.e., what to do if the packet matches it.
MASQUERADE    This target is only valid in the nat table, in the POSTROUTING chain.

2.Options used in the etc/dhcpd.conf are the domain-name and domain-name-server

3. To assign a fixed static IP address you need the ff. information:
IP address, netmask, network address, broadcast and gateway.





Tuesday, July 9, 2013

Domain Name server Configuration

Today I learned on how to ping host name in our domain

First We downloaded bind9 and edited files such as named.conf.local , db.192.168.2, and db bitwoel.com and also resolve.conf from the etc folder to specify the DNS server to use by the resolver




To check if my parameters are correct I used the command named-checkconf -z to check if my files created had any errors






and used named-checkzone bitwoel.com db.bitwoel.com
named-checkzone bitwoel.com db.192.168.2

from the etc/bind/ to check the validity of the zone file




We tested the dns server using the dig command to check the validity of the DNS server


And finally after everything check and done I pinged the other host names


Parts of the zone file:
The first line which depicts $TTL 86400 shows the default expiration time of all resource records without their own TTL value
Next the part "@ IN SOA"
The @ is a special notation that means origin
since the `domain' column for this file says 2.168.192.in-addr.arpa the first line really means "2.168.192.in-addr.arpa. IN SOA ... "
 The SOA describes where the zone comes from, which is responsible for it's contents and also the version of the zone file


- reference:
Domain Names - Implementation and Specification, P. Mockapetris, (November 1987)
http://www.tldp.org/HOWTO/DNS-HOWTO-5.html July 9, 2013

Tuesday, June 25, 2013

Exer 2 IP Routing

To start off with casual talk I had a fine day today with not much stress so I feel fine at the moment of my class.

Anyway The topic today was Ip routing where Sir Joman taught us a few Details and Current News Regarding IP addressing and also how to configure our computers IP Address.

I thougt it was gonna be hard to learn this new topic with all the new commands but with a steady pace of teaching thanks to sir Joman and Listening carefully to all the Instructions I was able to pull off the example to be done.

Since we couldn't actually communicate with another network (e.g. PC lab 8 and 9 will be connected). We will use a simulator made by Former Cmsc students here called Scalable Cisco IOS Simulator.The software can be downloaded from

http://jachermocilla.org/netsim-3.0.jar

The Software which we were using are courtesy of Michael B. Detras, Vincent B. Lee and Sir Ludwig Tirazona (my former lab instructor back from Cmsc 125)

The User Interface was alright, not too user friendly and not too techy... just the right mix for Cmsc students so it didn't take long for us to grasp its controls.

Basically what we did was connect a computer to a router and configure their IP addresses, Gateway and Mask.

Next up was the exercise which was more challenging than the example (should have seen that coming...) we were suppose to make a connection of 3 computers with only using a switch as a tip.

Here's an image of the connections. using 15 as the second number for all the router and computer names as my student number 2010-11703 adds up to it


 Now it made me think how would I be able to do this but luckily I was able to notice a detail concerning the configuration of a static IP route (global) at the routers.

It turns out all I add to do was add all the IP routes that the current computer needs to communicate, do the same technique with the other Routers, and presto... I could Ping all of the Computers and Routers.






And with that the second exercise is done with a few time to spare :)

Tuesday, June 18, 2013

First Exercise ExP

First post here in my blog and just finished my first exercise. It' very good that it was a lot easier to finish this exer than the exercises of cmsc subjects from previous years and its good to know that it won't be as hectic as them since there would less programming (Not that I don't like programming but it would be easier for me so I can focus on my other subjects mainly Cmsc 191 and 190-1).

I came to class a bit late since it was raining hard on that day and I didn't bring my umbrella and to top it up we are 22 in our section so since there wasn't enough Pc I'm using my own laptop. It was a nice beginning where I get to know again the people I've been classmates with since first year and I got know Sir Joman since this is the first time that he has been my teacher.

Here's the first screen shot required for the exer :)

though it was a rocky start for my exercise since my terminal wouldn't respond properly so I was a bit late in doing the exercise. By the way the exercise showed us how a network works with how we are able to chat and post message at our pc lab network.

Here I have successfully connected to the network

The command in the instructions were not so hard since we where taught about the in our previous subjects mainly Cmsc 124 and Cmsc 125 about the linux command and using secure shell for communication.

[rant] Nakaasar at pangalawang beses ko na tong itatype at biglang nagrefresh page [/rant]

Here's my login to the remote computer without using a password
Here's my first personal chat and write on wall with other users

And Lastly yes A password is required if I try to login for other workstations