Tuesday, November 20, 2007

OPS335W11

OPS335

ubuntu apt-getn install apache
info

sudo apt-get install bind


samaba 3 ways to act as a client

1. you can use a file/web browser that understands the smb protocol


Konquere understands the ftp http and smb protocols

2. command : smbclient
get
put

3. As root do the mount

mount -t cifs //matrix/john.selmys /mnt/banana



cifs driver uses encryption for the password, matrix samba server only accepts passwords in plain text



Assignment 3 (bonus)10%


Write up a document how you will set up a backup/restore system for a client



DNS

1978-79 tcp/ip started

two universities a line between the two, for U1 and U2

then came U3 and came online paying full price

/etc/hosts
each had a host file, information matches forward and reverse mapping, '
registered


1984 - DNS

root servers = 13



Too many request is a DOS denial of service


Vince Surf

Lab 9 Install Bind

Monday, November 19, 2007

DCN386 Frame Relay

http://www.cisco.com/univercd/cc/td/doc/cisintwk/ito_doc/frame.htm

What does Frame Relay do and how does it work?


Frame Relay - is a modern datacom protocol,
-created to handel a specific job
all protocols specific job
X.25 - Users for small amounts of data infrequently


However
Introduction to LAN 1990
-Require emerged, link Remote area networks together

- LAN 100mil bps

How can you connect this to connect two offices together?

X.25 - top speed in canada 64K----around----not sure-----

Frame Relay, equipment such as routers,
-Have serial ports
-Routers send data using HDLC, ciscos default

HDLC is a module, if you want FameRelay you get cisco to get you the Frame Relay Module

First out of the five.

-Frame Relay perfect protocol for intercommunication for LAN
-its good cause its incredibly fast

Why is frame relay fast?
-It doesnt do anything except transmit data
-Does do error checking, but if their is an error it dumps the frame
-The point is speed



-----------
X.25 do 20 seperate operations, so the packet is preserved and protects
-----------

Frame Relay devices do two things with every frame
-Validate it, error checking, dumps packet if error
-Validate the destination address, dumps it if it dont know it
-It makes sure every frame ZIPS through the network

--We let the end connections worry about the frames.

Where did Frame Relay come from?

A small part of a big initiative put by the ITU
In the future full digital everything
----------
Build the international digital service known as
ISDN
Essentially it failed

ISDN puzzle was examined by 4 companies and saw value in a little piece
Novel Telecome
Cisco
....


They developed the little piece called FrameRelay
-----------------------
Started an organization called FrameRelay Forum,
www.frforum.com
-----------------------
How does it work?

-First confusing thing
-Frame Relay is a DataLink Layer Protocol

----------------------
Phone companies have pre-build Frame Relay networks
ex: every bell office has routers that can handel FR
Idea customers can call bell and attach them into the FR cloud
---------------------
If you have a router of ur own u can take out the HDLC module and put in a FR modeuls
--------------------
Most orginations use the shared FR bell network
--------------------
Bell uses HIgh speed FIbre-optics
--------------------


Frame Relay Format:

f | Control | f

Flags are used when the amount of data is variable
-No specification of data unit

Because their is no knowledge of the variable it puts Flags around the data.

------------------------
Ethernet does 1500bytes
-----------------------

Frame Relay - Combines the address and control field, for the test call it Control

Control Field --- 2 3 or 4 bytes long
^ is known to use

Remember to understand a protocol look at the control field

2 bytes - 16 bits

first 6 bits
- Part of the protocols addressing scheme
second 4 bits
- Also part of frame relay addressing scheme

They are called the DLCI
Data-Link Control Id

| DLCI | DLCI |

In byte one its called the command response bits,
-useless no function


Last bit in byte one is the Extended address
-simply means their another byte incolved
In byte 2 theirs an extended address
- if the EA is a 1 theirs no more addressing

3 bits unaccounted for

BECN -Back Explicit COngestion Notification
FECN -Forward Explicit congestion Notification
DE -Disguard Eligibility

DE - is a key feature

-----------------------------------
Two organization

Have offices Vancouver and Toronto
Happy NEtworking People
-Want to use Bell Canada Frame Relay Network
-Big expensive Routers with FrameRelay Modules
-Bell network Extremely Fast Fibre Optic Cables
TD gets the Routers to the network
Scotia GIrl gets her Router to the network

How will bell build this network
-Bell Canada has a special device at the boundry called a FRAD
FRAD - Frame Relay Assembler Disasembler

Its at the parameters of the cloud not inside the cloud, thats how they attach themselves
to the cloud

SB and TD different data-
How does bell invoice?
-When you phone bell he asks how much data u going to send into the network
-Frame Relay was designed to handel bursts of data
-Designed to connect LANs
20% locally 70% lan
Want to know how big the bursts is going to be,

Range from 64K bps
128k BPS
etc...
Networker, does analysis how much data is going to be tranmitted
and a conclusion to how much data going to be sent and received
Bell bills towards the K
--------------------------------

Frame Relay simply moves the data to the next router, quickly as possible

--------------------------------

FRAD -- Bell canada programs the FRADS


How will bell build this network
-Bell Canada has a special device at the boundry called a FRAD
FRAD - Frame Relay Assembler Disasembler

Its at the parameters of the cloud not inside the cloud, thats how they attach themselves
to the cloud

--------------------------------

DiscardEgibility - gets turned on when you send bursts of data

Bell canda calls bursts of data CIR - COmmunited Information Rate

-------------------------------

Frame Relay has one trick, if it becomes congested, will drop the frame.

-----------------
Getting customers to commit to the FRAD rate if you congest(go over the) CIR rate.
-----------------

BECN -Back Explicit COngestion Notification
FECN -Forward Explicit congestion Notification

When a device gets congestions it turns on BECN and FECN,
Whole idea - intended by frame relay forum, user device would notice
frames will arrive, it was hoped somebody develop a
program to have their own flow control to control the data coming in
Everyone ignored these bits.
----------------



Subnetting:

11.0.0.0

Require 5000 Subnets




00000000.00000|000.00000000

10.0.0.0 internal address

Classless /26

Monday, November 12, 2007

OPS335W10

whereis ls


/usr/share/man

manare like ls, echo, cat, mv all of these are in volume 1

all the manupages are compressed in gz, its easier to read a small file rather then
a big file to memory to read it,

ls.1.gz

all system administration commands are going to be .8


rezise2fs - volume 8

copy the ls command to your home directory so you have something to work with,
gzip-d ls.1.gz

ls -l
ls.1

now its in a language groff
groff - is a precurses to html

If you look at the html, from html you have xhtml, xml, all of these are markup languages,
before this if you go to 1960, IBM made up GML, they are nothing new they are just
derivatives, some where you will see roff, which is a form, then

groff(GNU free version)

MKGW 8 NOve 2007 mkgw.8 admin commands

mkgw \- Configure a linux host as a network gateway

groff -Tascii -man mkgw.8 |more <---intrepret what it looks like,

gzip mkgw.8

be root and copy it to volume 8 be sure its zipped /usr/share/man8/


On our floppy, we should have mkgw, mkgw.8.gz


show mkgw groff, listing of all the groff listeing and we should also show the man page
bash program as well

chmod 644 <----man page
-----------------------------------------
---------------------------------------
------------------------------------
----------------------------------
Distributed File Systems

All about file sharing, share files between two Dos Machines


The idea is:


Server Client
/
| | | | | |
home home
| |
| |
frank joker
| |
| |
stuff---------------------junk

Make a directory under junk

Connect stuff to junk
Make a file under junk "ABC" as the Server

Alot of things ot be set up to make this work

you have to know the IP address of both machines

1. IP of each machine
"FQDN"
2. Server needs a file sharing program
and-configured to allow the client to read or write or r/w
the stuff directory.
File sharing deamon or file sharing server
It will allow the client to read the directory

Withing our Server we have a file sharing program to allow the client to use this program

3. The client needs a program or software, to attach and use stuff(dir) from the server


^^^^^^^^^^Basic idea od DFS(Distributed File Systems)

The two systems we look at are

NFS - method of sharing files
SAMBA - method of sharing files

Network File System

-Developed by Sun Microsystems 1984

When did the first pc come out 1988,
versions for Dos and Windows,

-important to note,
b/c it was written so long ago it uses ports in a different way

Web Server
-Running Apache
-Port 80 (waiting for connections)-------1024---IE6 (WINXP)
|_1026___Firefox (FEdora7)
|_1024___Safari (MAC OSX)
In 1984 Sun did not use port numbers
-used sun numbers,
ex: SUN NFS Server Sun Client
\(directories)--8----------------8----\(directories)
-The numbers used have nothing to do with ports ^^

This is where
-Remote Procedure Call (RPC)


--We still use the sun numbers but software converst it to ports

When you jrun the server you have to run another program
that changes the number to ports.

man exports ----its in /etc/exports
- on the server side this file tells what directories are avaliable
to which clients & in what mode, read or write mode
Their is an example in the man page
id frank

----------------------

NFS SErver NFS Client(Fedora 7 Client)

-host abc joker on xyz
/home xyz (r,w) $su -
/etc/exports #mount -t nfs abc:/home /mnt
|_usually an empty dir used for mounting
|
# | |
joker clown
#cd /mnt/joker
#rm *
This wi9ll alow the person to do w.e.

If you put xyz (r,w) root_squash
so the rm will fail

or no_root_squash

Setting NFS
1. install NFS-server
2. edit /etc/exports
3. start nfs server

4. you change /etc/exports

5. Choice
- Stop & stop the NFS server
OR
#exportfs -a
-reread the exports file without restarting



READ bout NFS



Samba is different
- Andrew Tridgell -wrote Samba-1995 Microsoft - SMB (used for fily sharing -OLD)
-idea to work in a microsoft enviroment -CIFS (Common internet file system) *newer*
-use windows as a client
- use the share
- can become a client on linux and become a user share
-he also wanted linux with its own share and have
win1 win2 win3 machines just as though linux was windows box
Basically Samaba - A client and a Server, a client for windows shares and a server for windows shares


using smb protocol to see the files in their
konquer - shows file systems and a webbrowser

seneca subnet 142.204
LEARN NFS and
export, exportfs, NFSDEAMON, know how to config the files


Lab 8 is three parts,

Connectings to a Samba server- file sharing server using
cifs - file samaba system
Part One - Client
Part Two - Own Samaba server

testparm - check if syntax is correct

Friday, November 9, 2007

DCN386W10

Alot of subnet questions in test 2

10.0.0.0
255.255.192.0

Question 2 Test2?

What is X.25 and how does it work?


X.25 when you see a letter then a number you know you are dealing with a protocol or equipement
ITU V.90

SDLC HDLC was last week, in PPP,

but their are different applications in this world,



Example.

A central computer, build a network for lottery ticket machines

X.25 solves specific application issue, if you have an application that sends data
infrequently you need X.25, lottery ticket, its a

Network Layer protocol, packet-switched network.

DCN386 only two network layer protocols, IP and X.25.

X.25 Network Packet Devices


X.25 designed to be a sutible protocol for people who want to send small amounts of data
infrequently.

All the telephone companies have all pre built x.25 network

Bell installed X.25 switched devices that spand all of canada

Easy to install and immediate benefit

Packet switching is already their and ready to be used. X.25.


Tip Top Tailers

because their all using the service is also shared, the second major benefit

It is extremely cost effecient. Pay for the service how much you use the network.

Based on a number of packets ur company of information

Packet is data send through a network layer protocol, IP and X.25 does this.

X.25 will take data and break it into a piece and will be a fixed lengthed, in Canada
Bell canada offeres serveral flavours, 90% of companies, of a basic frame size of 128bytes
this device will build you a packet and the max size is 128bytes.

Theory take user data, break it into pieces and sending it through the cloud.

How does the customer get the data into the cloud,

How does this work?

Simple their are 2 addresses involved,
1. is a real physical address
X121 - internation addressing scheme
-works and acts exactly like a phone number
-14byte address scheme
ha ha ha ha

Number can be up to 14 digits ex: 123-456-789-111

One of are job for us:
Supply the number of the cash register to dial into

The start of the day:

To set up the X.25, he(Manager) will send a packet from the tip top register called
-CALL REQUEST
-sent into the cloud
-goes to the switch, looks at the area local codes
-switch will select a route(path) through the network

The reciever will send a
-CALL ACCEPT

You now have a path way through a cloud,
-PathWay = Virtual Circuit

At the end of the day the guy turns the machine off, a last packet will be sent
-CALL CLEAR
No Longer a Virtual Circuit it is shut down

Another Day:
-CALL REQUEST
A Different Route is taken
-CALL ACCEPT
A Different Virtual Circuit

-------------
The X.25 machines are computer specialized in packet switching
-Lots of memory
Holding-Tables how to get to the Destination
--------------
First address is used in the CALL REQUEST

Once set up a second Address called:
-Virtual Circuit Address
-12 bits ~4096
---------------
VC-ID is sent = virutal circuit 1 - ALWAYS
-talking to 1 computer
---------------
Head office computers talk to Numerous Devices, thousands of lottery ticket machines-
-Identifying 4096 cicuits per physical line
---------------
X.25 Low Grade Low Speed Telecommunications Copper Wire ARgh!
---------------
When you phone bell and ask for an X.25 circuit, how many virtual curcuits on this physical line?
Pick a number -a number 0-4096

Never install more than
-32 virtual curcits in one physical line
----------------Rule of Thumb----------------------------
Cheap phone line!
------------------------------

Confusing Part:

Second thing that we will be asked when asking for the cuircut,

Do you want a private, switched or a combination of virtual circuit
-------------------
Two types of Virtual Circuits
-PVC (Private Virtual Circuit)
-SVH (Switched Virtual Circuits)

Depends on the packet a month you pay for it
--------------------
Another Cost a number of virtual circuits for a physical line

You want all permanent circuits, Bell will install a permanent route through the cloud
--------------------
Why would we used Switched hmmmm yea sooo
Three offices
Three networks
| | |




Every night the offices download the daily sales,
How many Virutal Circuits will i need on this line, One
All the networks in different locations and times will switch it,
-------------------
What if its modern and u want to install on real time, you would need three virtual circuits
and make them PVC


------------------------------------
-----------------------------------
---------------------------------
X.25 most endeering
Most Reliable protocol ever developed
-Error Handeling
-Flow Control Mechanisms
-----------------------------------
---------------------------------
-------------------------------
-Error Handeling (CRC)
------------------------------
-Max 128 bits
-Closest Circuit does error checking
-EVERY PORT IT'EL DO ERROR CHECKING
------------------------------------
------------------------------------
-FLOW CONTROL
- Any activity that prevents the loss of data
------------------------------------
------------------------------------
X.25 does not drop packets
-flow control mechnisms to stop sending data
--------------------------------------------
Because of speed its not used, ^ the things it does
--------------------------------------------

X.25 perfect for customers Infrequently
X.25 people looking over it!
X.25 1 component of a huge body of work
X.25 RULES PAD EQUIMENT TO ACCESS THE CLOUD
X.25 - small amounts data every so often ==== PERFECT ====

Once in the clout Dozen of protocols you can use

You can attached ur PC to Bells X.25 Network,

Phone connectiong, Packet Sender and Disembler (PAD)100$

--------------------------

X.3 - sepcification for what PADS do
X.75 - International speicification

--------------------------
X.25 is the slang to get into the cloud,
--------------------------


WEEK 13 TEST 2, IN THE LAB we are going to go the quiz, worth 10 %,

2 hours of subnetting

and Access Lists. ACL

GROOVEY LIKE GRAVEY

--------------------------

A packet arrives in a router, and the packet has the address 10.1.240.14, router does not revognize
the address and has the folling mask 255.255.240.0 , company network mask.


Class a 10.1.240.14

00000000.0000|0000.00000000

alL U HAVE TO do to see what subnet it belongs to?
00000001.1111|0000.00000000
subnet 31

Tuesday, November 6, 2007

OPS435W9

We are going to be covering stuff that is more difficult that what we have done so far,
regular expression, awk, sed language.

Looking at Assignment #2:

A program what makes exchange rate do, take any currency of any country and your program will exchange it to anyother country
from the exchange rate.


Done in 2 stages,

Stage 1, evalaluation varification of input, Nov 16
Stage 2, 2 weeks later

Being Partnersz we are going to use the RCS system

Between the two partners who accounts to use

In that persons home directory ~/asgm2/***/exchange.bash & RCS

710/ 710 / 770/ 770 / 770 /



#GroupMember:
#GroupMember:

The rates are freezed as of today and put on a table on the site

convert.table will reflect the data in that file

cad
CAD
Cad



2arg cad us


Oc can do anything mathimatics


sed -nl | file

We are going to use regular expressions, subject of our lecture today

What are they used for?
To match patterns in data


You can use similar special chars to search for patters in data, called regular expression.


grep 'patt' f1

FNE * - zero or more
RE * - Zero or more of the previous char

FNE . - is dot
RE . - any single char

FNE ? -any single char
RXE ? - is a ? extended regular expression -egrep -awk - zero or one of the previous char


FNE - [!dfds]
RE - [^Fdsa]

RE - ^a[^fds]d - specifies the begining of the line because the other one does any pattern within the line
$ - its the end of the line, this belongs at the end of ^^ that line

.* - zero or more any character, combine those two<---

RE - a\{3\}b - a repeater refereing to the previous char which is a, how many a's their are, 3 a's followed by a b = aaab.
,5 - min 3 max 5, longest pattern first then the shortest

RXE - a+b - extended regular expression - one or more of the previous char. shortest patt ab.

RE - a+b|c?d - the pipe is a or

grep - can use RE - single pattern
egrep - can use RXE - multiple pattern by using the or which is the |


grep 'a+b|c?d' f1 - none are special chars to grep
egrep 'a+b|c?d' f1 - 1 or more a's followed by a b OR zero or 1 c's followed by a d


echo $1|grep '^[0-9]\{8\}$'

(( *sum *= *$?AA *+ *$?BB *))

sed

:S,$ s/exchange/convert/g - in vi

g = globably
no g only first match each line

sed - stream line editor, tell sed what to make to data

sed -op 'address sub-comm/searchpattern/replacepatt/tag' data

some options:

-n
-f
-e

address :

2,10 - only lines through 2 to 10 do the stuff
can also use RE
2,/dog.s/ - start at line 2 next line must have dogs or dogs
/dog.s/,15
1,$ - line 1 to the end of the file
subcommands cover:
s - search
i
a
c

Search pattern:
-RE - here

replacement pattern:
does not use RE

tags:
g - global
d - delete
p


How sed actually really works

has a pattern space buffer,
opens the file takes line number 1 first thing it does check the line number, automatically line 1 goes to STNOUT
Next line comes in #2, address match yes then continue with the rest, if we say s subtitute search for a pattern it will
replace it with that pattern.

sed '/^$/d' f1 - delete blank lines

DCN386 Introduction To SDLC

SDLC Intro-Continue
P=Primary Unit
S=Secondary Unit

-SDLC is a primary Systems Network Architechture (SNA) link layer protocol for WAN links

-Used with PPP & multipoint links bounded & unbounded media, half & full duplex transmission, transmission facilities, and circuit switched and packet switched networks.

- Network nodes: primary and secondary

Primary - control the operation of other station called, secondaries.

P & S connected by four basic configs-

Point-to-Point - two nodes 1P & 1S
Multipoint - 1P 2xS
Loop - topology P = First & Last S (connected to first and last S)
Hub go-ahead - In bound/outbound channel
P-outb-S S-inb-P
In bound daisy-chained back to the P through each S
--------------------------------------------------------------------------------
Derivative Protocols
- IEE 802.2 LLC is a modification of HDLC for LAN enviroments

-HDLC is a compatible super set of SDLC

-Qualified logical link control is a link layer protocol defined by IBM that allows SNA to be transported across X.25 networks.

-----------------------------------------------------------------------------------
High-Level Data Link Control (HDLC)
-HDLC supports sync, full-duplex operation

-HDLC 32-bit checksum, does not support the loop or hub go-ahead configs

SDLC 1 transfer mode
HDLC Supports THREE:

Normal Response Mode (NRM) - Used by SDLC. S cannot communicate with a P until P gives permission

Asynchronous Response Mode (ARM) - S to intiate comm w/ a P unitil P have given permission

Asynchronous balanced Mode (ABM) - Combined mode ABM - act as a P or S depending on the situation - Occurs through multiple combined nodes - No permission required-

----------------------------------------------------------------------------------
Link Access Procedure Balance
- in X.25 protocol stack
- shares same frame types, and field functions as SDLC & HDLC
- Restricted to ABM
- Can be established through DTE & DCE
- Intiate call P responding S
- LAPB use of the P/F bit is different from that of other protocols
-------------------------------------------------------------------------------------
IEEE 802.2
Three types of service
T1- procides unack connectionless service
-TCP/IP componsate for this
-commonly used

T2 -connection oriented
-ack data upon receipt
-used in IBM communication

T3 -ACK service
-Factory automated enviroments
-where eroor detection is important

Upper-layer proccess use IEEE 802.2 services through service access points.

------------------------------------------------------------------------------
802.2 header DSAP - Destination service acc point
- identifies the receiving upper-layer proccesses
------------------------------------------------------------------------------

Monday, November 5, 2007

OPS335W9

OPS335

Lab #7 setting up web server using apache,
Assignment 2 posted


Intresting networking type commands:

netstat -an |grep :80|wc -l - how many connections you have to your apache web server

/sbin/ifconfig - to configure an interface, bring it down or up

Commands located in for:
/sbin - administrators
/bin - regular uses

arp - find out MAC address

hostname - tell you host name or change your host name

host yahoo.com - does a dns query which are handeled on port 53, you can also to ip to hostname

ssh username@hotname - its encrypted

scp - remote:/home/me/junk/* . [from] [to]


rsync - sync two directories, if you have host a and host b with 2 harddrive the firstname you do rsync the two harddrives
because identical to the other harddrive.The second time you do it it copies the files that were updates.

tcpdump - print all traffic in the network - nice to monitor what is going on.

nmap [website] - used for port scan - 65000 on Unix -

wget [website] - retrive website information -r whole website tree

Apache Shell commands

httpd - its a deamon

service httpd restart

The very first webserver was called MOSAIC by NSC government computer before IE before Mozilla.

Apache, pached mosaic, Microsoft Webserver is called IIS

50% =====apache
40% =====IIS

/etc/resolv.conf ----short form of resolver---take a domain name and convert it to an ip number

/etc/hosts - names and ip numbers for the local

/etc/nsswitch.conf - order where to look first

/var/log - contains all logging information, want to know what happen to the system \

rootkit hunter- malacious attack suspected

Assignment

A Man page, and a bash script

mkgw

interneral, masquerading

serveral designes


mkgw.8
volume 8 - fdisk

volume 1 - cat, ls

man man ^^