Networking, Security & Cloud Knowledge

Wednesday, December 26, 2012

Wireless AP role


Understanding Access point role.

Table 1 Role and Association Matrix

Root Access Point
Root Bridge (without Wireless Clients)
Non-root Bridge
Non-root Bridge with Wireless Clients
Workgroup Bridge
Root Access Point




X
Root Bridge


X
X
X
Non-root Bridge without Wireless Clients

X

X

Non-root Bridge with Wireless Clients

X
X


Workgroup Bridge
X
X



Universal Workgroup Bridge
X
X






Access Point Role:

·         In the access point role the router accepts associations from wireless clients and non-root devices, such as a non-root bridge

Root Access Point: If the access point provides its clients a connection to a wired network through a wired connection it is said to be a root access point.

·         A device in root mode accepts associations with non-root devices, such as a non-root bridge.


Bridge Role

Wireless bridges provide higher data rates and superior throughput for data-intensive and line of sight applications. High-speed links between the wireless bridges deliver throughput that is many times faster than the E1/T1 lines for a fraction of the cost. In this way, wireless bridges eliminate the need for expensive leased lines and fiber-optic cables.

The wireless bridge can link LANs either through the wired interface or through the wireless interface.

Wireless bridges can be configured for point-to-point and point-to-multipoint applications.


Root Bridge: The station-role root bridge mode accepts associations with non-root bridge devices and can be set to

accept wireless clients. For example:

wd(config)#interface dot11radio interfacenumber

wd(config-in)#station-role root bridge wireless-clients

Saturday, August 25, 2012

Understanding IPv6 Address

Introduction:


RIR (Regional Internet Registries)

1. RIPE NCC

2. AfriNIC

3. APNIC

4. ARIN

5. LACNAC





Time line:

• 3rd FEB 2011 last remaining /8 pools were allocated amongest the five Regional Internet Registries

• 15th APR 2011 APNIC pool consist of the final /8 block



Why to move to IPv6

• ipv4 address pool exhausted

• NGN capabilities to defence

• Govt. mandates

• cable market address scaling

• population densities in APAC

• 4G deployments

• connects people and things not only computer



When enterprise will deploy Ipv6

• They have an application requirement to drive it

• Their presence on the Internet is compromised by lack of IPv6 access

• The price of an IPv4 address exceeds the hardware cost to route it





Ipv6 Introduction

• IPv6 addresses are 128 bits long

o Segmented into 8 groups of four HEX characters (called HEXtets) Separated by a colon (:)



• Default is 50% for network ID, 50% for interface ID

o Network portion is allocated by Internet registries 2^64 (1.8 x 1019),Still leaves us with ~ 3 billion network prefixes for each person on earth



340,282,366,920,938,463,374,607,432,768,211,456

(IPv6 Address Space - 340 Trillion Trillion Trillion)

vs

4,294,967,296

(IPv4 Address Space - 4 Billion)

• Abbreviations are possible

Only Leading zeros in contiguous block could be represented by (::)

2001:0db8:0000:130F:0000:0000:087C:140B

2001:0db8:0:130F::87C:140B

Double colon can only appear once in the address



• IPv6 uses CIDR representation

IPv4 address looks like 98.10.0.0/16

IPv6 address is represented the same way 2001:db8:12::/48

Notation must be represented in 16 bit blocks irrespective of the mask e.g. FE80::/10, or FF00::/8



• Addresses are assigned to interfaces



• An IPv6 interface is “expected” to have multiple addresses and multiple scopes



• Addresses have scope

o Link Local

o Unique Local

o Global



• Addresses have lifetime

o Valid and preferred lifetime





IPv6 Address

•Loopback address representation

0:0:0:0:0:0:0:1 == ::1 Same as 127.0.0.1 in IPv4 Identifies self



•Unspecified address representation

0:0:0:0:0:0:0:0 == ::

Used as a placeholder when no address available (Initial DHCP request, Duplicate Address Detection DAD)

NOT the default route



•Default Route representation

::/0







IPv6 Address Types

Three types of unicast address scopes

• Link-Local – Non routable exists on single layer 2 domain (FE80::/64)

o FE80:0000:0000:0000:xxxx:xxxx:xxxx:xxxx



• Unique-Local – Routable within administrative domain (FC00::/7)

o FCgg:gggg:gggg:ssss:xxxx:xxxx:xxxx:xxxx

o FDgg:gggg:gggg:ssss:xxxx:xxxx:xxxx:xxxx



• Global – Routable across the Internet (2000::/3)

o 2ggg:gggg:gggg:ssss:xxxx:xxxx:xxxx:xxxx

o 3ggg:gggg:gggg:ssss:xxxx:xxxx:xxxx:xxxx







Multicast addresses (FF00::/8)

• FFzs: xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx

o Flags (z) in 3rd nibble (4 bits) Scope (s) into 4th nibble







IPv6 Addressing Types Summary: (Represented in Binary and Hex)

Type Binary Hex

Global Unicast Address 001 2 or 3

Link Local Unicast Address 1111 1110 10 FE80::/10

Unique Local Unicast Address 1111 1100 1111 1101 FC00::/7 FC00::/8(registry) FD00::/8 (no registry)

Multicast Address 1111 1111 FF00::/16

Solicited Node Multicast FF02::1:FF00/104





Allocation Process

IANA 2000::/3

Registries 2000::/12

ISP 2000:/32

Enterprise 2000:/48



Global Unicast Address Interface ID

• Interface ID unicast address may be assigned in different ways

o Auto-configured from a 64-bit EUI-64 or expanded from a 48-bit MAC

o Auto-generated pseudo-random number (to address privacy concerns)

o Assigned via DHCP

o Manually configured



• EUI-64 format to do stateless auto-configuration

o Expands the 48 bit MAC address to 64 bits by inserting FFFE into the middle

o To ensure chosen address is from a unique Ethernet MAC address

o The universal/local ( “u” bit) is set to 1 for global scope and 0 for local scope





• IPv6 Interface Identifier (EUI-64 format)

o Cisco uses the EUI-64 format to do stateless auto-configuration

o This format expands the 48 bit MAC address to 64 bits by inserting FFFE into the middle 16 bits

o To make sure that the chosen address is from a unique Ethernet MAC address, the universal/local (“u” bit) is set to 1 for global scope and 0 for local scope

o Cisco devices ‘bit-flip’ the 7th bit







• Link-Local Address

1111 1110 10

FE80::/10

o Mandatory for communication between two IPv6 devices

o Automatically assigned by device using EUI-64

o Also used for next-hop calculation in routing protocols

o Only link specific scope

o Remaining 54 bits could be zero or any manually configured





• Unique Local Address (RFC 4193)

o 1111 110L

o FC00::/7

o ULA are “like” RFC 1918 – not routable on Internet

o ULA uses include

 Local communications

 Inter-site VPNs (Mergers and Acquisitions)

o FC00::/8 is Registry Assigned (L bit = 0), FD00::/8 is self generated (L bit = 1)

 Registries not yet assigning ULA space, http://www.sixxs.net/tools/grh/ula/

o Global ID can be generated using an algorithm

 Low order 40 bits result of SHA-1 Digest {EUI-64 && Time}





• IPv6 Multicast Address (RFC 4291)

o An IPv6 multicast address has the prefix FF00::/8 (1111 1111)







Well Known Multicast Addresses





Address Scope Meaning

FF01::1 Node-Local All Nodes

FF01::2 Node-Local All Routers

FF02::1 Link-Local All Nodes

FF02::2 Link-Local All Routers

FF02::5 Link-Local OSPFv3 Routers

FF02::6 Link-Local OSPFv3 DR Routers

FF02::1:FFXX:XXXX Link-Local Solicited-Node





• Solicited-Node Multicast Address

o For each Unicast and Anycast address configured there is a corresponding solicited-node multicast (Layer 3 address)

o Used in neighbor solicitation (NS) messages

o Multicast address with a link-local scope

o Solicited-node multicast consists of

o FF02::1:FF & {lower 24 bits from IPv6 Unicast interface ID}



IPv6 Interface example





Header comparison



IPv6 unique local address


Site-Local Addresses

• First stab at having a private address space range for our internal organizations

• Similar to RFC 1918 for IPv4.

• This address space was defined in RFC 3513

• Being in the range FEC0::/10.

• Basically what this means is that the first 12 bits of the address had to look something like this:

o 1111 1110 11xx

o [ F ] [ E ] [C-F]

The site-local address was the first attempt at letting network admins assign their own private addressing for their “sites.” The issues with it were that the term “site” was somewhat ambiguous. Nobody could really agree on what a “site” was. Secondly, there was no guarantee that no two sites within the same organization would not end up using overlapping site addressing due to carelessness or whatever else. Site-Local addresses went to sleep permanently when deprecated officially in RFC 3879.

Unique-Local Addresses (Replaces Site local address)

• Unique-Local addresses have officially replaced site-local addresses.

• There are really two different “flavors.” Unique-Local Addresses (ULA) are defined in RFC 4193

• They are given the range FC00::/7.

• Basically your first 8 bits will look like this:

o 1111 110x

o [F ] [C-D]

• Overall, your unique-local address will look something like this:

o F[C-D]xx:xxxx:xxxx:yyyy:zzzz:zzzz:zzzz:zzzz

 It starts with either FC or FD in hexadecimal.

 The string of ‘x’s there represents what we call our “global-id” which would describe your company and is 40 bits long.

 The string of ‘y’s represent what we call the “subnet-id” which describes the sites within your company and is 16 bits long.

 The string of ‘z’s is the remaining 64 bits that represent a host.

 So essentially you have a 40-bit value that represents your company and 16 bits to play with for subnetting (which gives you up to 65,535 /64 subnets).

We have this FC00::/7 range. Basically some people thought the 40-bit global-id should be something centrally assigned by a registrar of sorts (similar to ARIN). The addresses would still not be routable on the public internet, but would be controlled by a trusted third party registrar. The reasoning was so that it was guaranteed that no two sites within an organization would ever get overlapping ranges.

On the other hand, other people didn’t like the idea of having private addresses allocated to them. Therefore, what they did was a compromise.

They took this massive FC00::/7 range and broke it up into two individual /8’s – FC00::/8 and FD00::/8 and each one works a bit differently.

Unique-Local Locally-Assigned Addresses (FD00::/8)

The people that do not want their private addresses assigned to them by a third party get this range. The kicker is that in the RFC the way that 40-bit global-id get’s picked is still not really Supposed to be up to you. It is a randomly generated number (at least “pseudo-random”). So, with FD00::/8 you get something like this

FDxx:xxxx:xxxx:yyyy:zzzz:zzzz:zzzz:zzzz

Where string of ‘x’s is still the global-id and is 40-bits long…it is just randomly generated, or at least SHOULD be. The rest is the same…we still have 16 bits for subnetting and a /64 host address

Unique-Local Centrally-Assigned Addresses (FD00::/8)

The people that were for the private addresses being centrally assigned by some sort of registrar get the FC00::/8 range. Now, as of right now this organization that is supposed to hand out the addresses really doesn’t exist yet, the concept is similar except now you have something like this:

FCxx:xxxx:xxxx:yyyy:zzzz:zzzz:zzzz:zzzz

Where string of ‘x’s is still the global-id and is 40-bits long. The rest is the same…we still have 16 bits for subnetting and a /64 host address





IPv6 Lab in GNS3

IPv6 test lab on GNS to Demontrate following
  1. Dual Stack
  2. MP BGP to enabel IPv6 routing
  3. HSRPv2
  4. IPv6 Autoconfiguration


IOS used: c3745-advipservicesk9-mz.124-15.T7



Setup description:

IP address / subnet details

• IPv4

o 192.168.1.0 /24 R1-R2-R3 LAN

o 192.168.3.0/24 between R1 & R4

o 192.168.5.0/24 between R2 & R4

o 192.168.4.0/24 R4 loopback

o R1 & R2 running hsrp group 2 with virtual ip 192.168.1.1



• IPv6

o 2001::/64 R1-R2-R3 LAN

o 2003::/64 between R1 & R4

o 2005::/64 between R2 & R4

o 2004::/64 R4 loopback

o R1 & R2 running hsrp v2 group 1 with auto-configured virtual ip





• BGP detail

o R1 & R2 running ibgp within AS 10

o R4 is AS 40 is running eBGP with R1 & R2 in AS 10 respectively

o R3 is used like end host with default route.



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


R3 Configuration

Hostname R1

!

ipv6 unicast-routing

!

interface FastEthernet0/0

ip address 192.168.1.3 255.255.255.0

duplex auto

speed auto

ipv6 address autoconfig default

end

!

ip route 0.0.0.0 0.0.0.0 192.168.1.1

!

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

R1 configuration

Hostname R2

!

ipv6 unicast-routing



!

interface FastEthernet0/0

ip address 192.168.1.2 255.255.255.0

duplex auto

speed auto

ipv6 address 2001::1/64

standby version 2

standby 1 ipv6 autoconfig

standby 1 priority 110

standby 1 preempt

standby 1 track FastEthernet0/1 20

standby 2 ip 192.168.1.1

standby 2 priority 110

standby 2 preempt

standby 2 track FastEthernet0/1 20

end

!



interface FastEthernet0/1

ip address 192.168.3.2 255.255.255.0

duplex auto

speed auto

ipv6 address 2003::2/64

end



!

router bgp 10

no synchronization

bgp router-id 1.1.1.1

bgp log-neighbor-changes

network 192.168.1.0

neighbor 2001::2 remote-as 10

neighbor 2003::1 remote-as 40

neighbor 192.168.1.3 remote-as 10

neighbor 192.168.3.1 remote-as 40

no auto-summary



!

address-family ipv6

neighbor 2001::2 activate

neighbor 2003::1 activate

network 2001::/64

exit-address-family

!

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

R2 Configuration



Hostname R2

!

ipv6 unicast-routing

!

interface FastEthernet0/0

ip address 192.168.1.3 255.255.255.0

duplex auto

speed auto

ipv6 address 2001::2/64

standby version 2

standby 1 ipv6 autoconfig

standby 1 preempt

standby 2 ip 192.168.1.1

standby 2 preempt

!

interface FastEthernet0/1

ip address 192.168.5.2 255.255.255.0

duplex auto

speed auto

ipv6 address 2005::2/64

!

router bgp 10

no synchronization

bgp router-id 2.2.2.2

bgp log-neighbor-changes

network 192.168.1.0

neighbor 2001::1 remote-as 10

neighbor 2005::1 remote-as 40

neighbor 192.168.1.2 remote-as 10

neighbor 192.168.5.1 remote-as 40

no auto-summary

!

address-family ipv6

neighbor 2001::1 activate

neighbor 2005::1 activate

exit-address-family

!

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

R4 configuration

!

Hostname R4

!

ipv6 unicast-routing

!

interface Loopback0

ip address 192.168.4.1 255.255.255.0

ipv6 address 2004::1/64

!

interface FastEthernet0/0

ip address 192.168.3.1 255.255.255.0

duplex auto

speed auto

ipv6 address 2003::1/64

!

interface FastEthernet0/1

ip address 192.168.5.1 255.255.255.0

duplex auto

speed auto

ipv6 address 2005::1/64

!

router bgp 40

no synchronization

bgp router-id 4.4.4.4

bgp log-neighbor-changes

network 192.168.3.0

network 192.168.4.0

network 192.168.5.0

neighbor 2003::2 remote-as 10

neighbor 2005::2 remote-as 10

neighbor 192.168.3.2 remote-as 10

neighbor 192.168.5.2 remote-as 10

neighbor 192.168.5.2 route-map PREPEND out

no auto-summary

!

address-family ipv6

neighbor 2003::2 activate

neighbor 2005::2 activate

neighbor 2005::2 route-map PREPEND out

network 2003::/64

network 2004::/64

network 2005::/64

exit-address-family

!

route-map PREPEND permit 10

set as-path prepend 40 40 40

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


Show commands:



R1 output







R2 output


R4 output


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

Commands:

1 To clear ipv6 bgp neighbor

clear bgp ipv6 unicast x:x:x:x::x



Monday, March 26, 2012

[030] H3C Switch configuaration example

Switch used:      H3C S5100-24P


Commands:
To see currnet configuaration
display current-configuration

To see hardware details
display version

H3C Comware Platform Software
Comware Software, Version 3.10, Release 2201
Copyright (c) 2004-2008 Hangzhou H3C Technologies Co., Ltd. All rights reserved.
H3C S5100-24P-SI uptime is 0 week, 0 day, 0 hour, 11 minutes
H3C S5100-24P-SI with 1 Processor
64M bytes DRAM
16M bytes Flash Memory
Config Register points to FLASH
Hardware Version is REV.B
CPLD Version is 002
Bootrom Version is 619

[SubSlot 0] 24 GE ( 4 COMBO ) Hardware Version is REV.B


To enter privilege mode
system-view
System View: return to User View with Ctrl+Z.
[H3C]

To assign the port in vlan
[H3C] vlan 1000
[H3C-vlan 1000] port GigabitEthernet 1/0/2
[H3C-vlan 1000] port GigabitEthernet 1/0/2 to GigabitEthernet 1/0/24
[H3C-vlan 1000] quit

To add default gateway / static route
[H3C]ip route-static 0.0.0.0 0.0.0.0 next-hop-address

To reboot the switch
reboot 


To save the configuaration
save

To set the ip addres on interface
[H3C] intervace vlan 1

[H3C-Vlan-interface1] ip address 10.10.10.10 24


To remove / delete old command
delete / undo


To enable telnet:
[H3C]user-interface vty 0
[H3C-ui-vty0-4]user privilege level 3

[H3C-ui-vty0-4]set authentication password simple PASSWORD
[H3C-ui-vty0-4]

Saturday, March 3, 2012

Windows Quick Fix

Windows XP
Microsoft Office Picture Manager takes a lot of time to load
Cause: Picture manager keeps track of the most recently used paths, and if any of these paths is no longer available (most if you have accessed a folder over the network, and you are no longer able to access that location.

Fix:
For windows XP, go to c: -> documents and settings -> username -> local settings -> application data -> Microsoft -> OIS

Open the file ‘oiscatalog.cag’ with  notepad and delete any line pointing to a remote location or delete that file as it is recreated upon starting the software again.

For vista, the path to that file is C:\Users\login name\AppData\Local\Microsoft\OIS

Tuesday, February 28, 2012

029 - Configuring Cisco ASA 5505

Configuration example Cisco ASA 5505
Descriptions:
Device has eight 10/100 Ethernet port E0/0 to E0/7, last two port E0/6 & E0/7 are PoE.




Licensing:

  • Base License
    • 3Vlans
    • Support three security zones (inside, outside, dmz) but with communication restriction between DMZ & INSIDE
      (Note: Inside vlan is permited to send traffic to the dmz only, but reverse traffic is not permited.
    • No failover redundancy

  • Security Plus Licens
    • Upto 20 VLANs
    • Failover redundancy


To Verify Serial Number and License type of ASA 5505

ciscoasa# show activation-key
Serial Number: XXXXXXXXXXX
Running Permanent Activation Key: 0xXXXXXXXX 0xXXXXXXXX 0xXXXXXXXX 0xXXXXXXXX 0xXXXXXXXX
Licensed features for this platform:
Maximum Physical Interfaces : 8 perpetual
VLANs : 3 DMZ Restricted
Dual ISPs : Disabled perpetual
VLAN Trunk Ports : 0 perpetual
Inside Hosts : 10 perpetual
Failover : Disabled perpetual
VPN-DES : Enabled perpetual
VPN-3DES-AES : Enabled perpetual
AnyConnect Premium Peers : 2 perpetual
AnyConnect Essentials : Disabled perpetual
Other VPN Peers : 10 perpetual
Total VPN Peers : 25 perpetual
Shared License : Disabled perpetual
AnyConnect for Mobile : Disabled perpetual
AnyConnect for Cisco VPN Phone : Disabled perpetual
Advanced Endpoint Assessment : Disabled perpetual
UC Phone Proxy Sessions : 2 perpetual
Total UC Proxy Sessions : 2 perpetual
Botnet Traffic Filter : Disabled perpetual
Intercompany Media Engine : Disabled perpetual
This platform has a Base license.
The flash permanent activation key is the SAME as the running permanent key.

Clear configuration on  ASA 5505
ASA5505# write erase

Resetting ASA 5505 to factory default
ASA5505(config)# config factory-default

Note: Factory default setting
  • DHCP is enabled
  • Preconfigured with two VLANs:
    • Vlan 1 - Switchport E0/1 - E0/7 (inside trusted interface)
    • Vlan 2 - Switch port E0/0 ( outside untrusted interface)
  • Internal IP address is now 192.168.1.1


To set Privileged level password (enable password)
ASA5505(config)# enable password mysecretpassword

Configure the private inside interface
ASA5505(config)# interface vlan 1
ASA5505(config-if)# nameif inside
ASA5505(config-if)# security-level 100
ASA5505(config-if)# ip address 10.0.0.1 255.255.255.0

ASA5505(config)#interface e0/1
ASA5505(config-if)#switchport access vlan 1

Configure the public outside interface
ASA5505(config)# interface vlan 2
ASA5505(config-if)# nameif outside
ASA5505(config-if)# security-level 0
ASA5505(config-if)# ip address 192.168.1.1 255.255.255.0

ASA5505(config)# inteface e0/0
ASA5505(config-if)# switchport access vlan 2

Configure the  DMZ interface (BASE License)ASA5505(config)# interface vlan 3
ASA5505(config-if)#no forward interface vlan 1
ASA5505(config-if)# nameif dmz
ASA5505(config-if)# security-level 50
ASA5505(config)# ip address 172.10.0.1 255.255.255.0

ASA5505(config)#interface e0/2
ASA5505(config-if)#switchport access vlan 3

If ISP is going to provide ip addess to outside interface then we can configure is as follows:
interface  vlan 2
 nameif outside
 security-level 0
 ip address dhcp setroute

Note: ip address dhcp setroute : gets ip address and also set default ISP as default gateway

interfae e0/0
  swithport access vlan 2

To enable management access to ASA from internal subnet 10.0.0.0 /24
http server enable
http 10.0.0.0 255.255.255.0 inside

Configure static route to reach internal subnet 10.0.0.0/24
route inside 10.10.10.0 255.255.255.0 ethernet 0/1

Configure default route to reach outside (internet)
route outside 0.0.0.0 0.0.0.0 192.168.1.2

Configure static router to DMZ
route dmz 172.16.0.1 255.255.255.0 ethernet 0/2

To configure DHCP pool for inside subnet
dhcpd address 192.168.1.2-192.168.1.50 inside
dhcpd enable inside

Sunday, February 26, 2012

028 Password Recovery CISCO ASA 5505 Security Appliance

Password Recovery procedure for Cisco ASA 5505 Security Appliance.


1. Power-cycle your security appliance by unpluggin and pluggin the power cable.
2. Press Esc to interrupt the boot process and enter ROM Monitor mode.
      You will see a rommon prompt (rommon #0>).
3. Enter the confreg command to view the current configuration register setting:
                  rommon #0>confreg4. The current configuration register should be the default of 0x01 (it will actually display as 0x00000001). The security appliance will ask if you want to make changes to the configuration register. Answer no when prompted.
5. Change the configuration register to 0x41, which tells the appliance to ignore its saved (startup)configuration upon boot:
                  rommon #1>confreg 0x41
6. Reset the appliance with the boot command:
                  rommon #2>boot
7. The security appliance ignore the saved configuration and once it boot up following User Mode prompt will appear:
 ciscoasa>
8. Enter the enable command to enter Privileged Mode. When the appliance prompts you for a password, simply press:
ciscoasa>enable
Password:
ciscoasa#
9. Copy the startup configuration file into the running configuration with the following command: ciscoasa#copy startup-config running-config
10. Enter the following command to change the Privileged Mode password:
asa#conf t
asa(config)#enable password abcd
11. Change configuration register to the default of 0x01 so that ASA read its startup configuration on boot: asa(config)#config-register 0x01
12. Verify the configuaration change:
asa(config)#exit
asa#show version
Note: At bottom of the output of the show version command, you should see the following statement: Configuration register is 0x41 (will be 0x1 at next reload)
13. Save the current configuration
asa#copy run start Source filename [running-config]
14. Reload the security appliance:
asa# reload
System config has been modified. Save? [Y]es/[N]o:yes
Cryptochecksum: XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX

2149 bytes copied in 1.480 secs (2149 bytes/sec)
Proceed with reload? [confirm]








Saturday, February 18, 2012

027-BGP - Border Gateway Protocol




Introduction to BGP: 

  • Path Vector protocol
  • Administrative Distance: eBGP = 20 , iBGP = 200
  • Protocol: IP , TCP port 179
  • Authentication : MD5

BGP Attributes Categories
  • Well-known mandatory (WM) - attributes must be supported and included in routing updates
  • Well-known discretionary (WD) - attributes must be supported but may not be included routing updates
  • Optional transitive (OT) - attributes don't have to be supported, but Marked as partial & passed onto peers
  • Optional nontransitive (ON) - attributes don't have to be supported, and can be ignored.


BGP Attributes
    1. Weight (O)- Cisco proprietary, a 16-bit value used only by local router.
    2. Origin (WM) - The source of the route (IGP > EGP > unknown)
    3. AS Path (WM) - An ordered list of the ASs the route has traversed
    4. Next Hop (WM) - Specifies the next-hop address for the route
    5. Local Preference (WD) - Communicated between iBGP peers to favor a route out of the AS
    6. Multi Exit Discriminator (ON) - Advertised to eBGP peers to indicate a preferred entrance into the local AS
    7. Atomic Aggregate (WD) - Notes that route summarization has been performed
    8. Aggregator (OT) - Identifies the router and AS where summarization was performed
    9. Community (OT) - Provides route tagging capability
    10. Originator ID (ON) - Identifies a route reflector
    11. Cluster List (ON) - Records the route reflector clusters the route has traversed
 NOTE:
An AS Path can be one of two types as distinguished by its type code:
  • AS Sequence - An ordered list
  • AS Set - An unordered list
An AS Set is used to record AS numbers lost when aggregation is performed. The Atomic Aggregate
attribute does not have to be included to indicate aggregation has been performed if an AS Set is
included.




BGP Path Selection Process:







Friday, February 17, 2012

030 SQL commands

Introduction to SQL

  • SQL is a standard language for accessing and manipulating databases.
  • SQL is an ANSI (American National Standards Institute) standard, there are many different versions of the SQL language.
To build a web site that shows some data from a database, you will need the following:
  • An RDBMS database program (i.e. MS Access, SQL Server, MySQL)
  • A server-side scripting language, like PHP or ASP
  • SQL
  • HTML / CSS

 

RDBMS :Relational Database Management System.


  •  RDBMS is the basis for SQL, and for all modern database systems like MS SQL Server, IBM DB2, Oracle, MySQL, and Microsoft Access. 
  • The data in RDBMS is stored in database objects called tables. 
  • A table is a collection of related data entries and it consists of columns and rows.

SQL Command Summary:
CREATE DATABASE
CREATE DATABASE database_name

CREATE TABLE
CREATE TABLE table_name

(
column_name1 data_type,
column_name2 data_type,
column_name2 data_type,
...
)

UPDATE
UPDATE table_name
SET column1=value, column2=value,...
WHERE some_column=some_value

ALTER TABLE
ALTER TABLE table_name
WHERE SELECT Specific Column  ADD column_name datatype
OR

ALTER TABLE table_name
DROP COLUMN column_name

SELECT

SELECT column_name(s)
FROM table_name


SELECT ALL
SELECT * FROM table_name

SELECT DISTINCT
SELECT DISTINCT column_name(s)
FROM table_name

AND / OR
SELECT column_name(s)
FROM table_name
WHERE condition
AND | OR condition

BETWEENSELECT column_name(s)
FROM table_name
WHERE column_name
BETWEEN start_value AND end_value

ORDER BYSELECT column_name(s)
FROM table_name

ORDER BY column_name [ASC | DESC]

LIKESELECT column_name(s)
FROM table_name
WHERE column_name LIKE pattern

WHERE
SELECT column_name(s)DELETE
DELETE FROM table_name
WHERE column_name=specific_value
Note:
DELETE FROM table_name  OR  DELETE * FROM table_name
will delete entire table.

DROP Command

DROP DATABASE database_name
FROM table_name
WHERE column_name operator value

DROP TABLE
DROP TABLE table_name


SELECT TOP
SELECT TOP number | percent column_name(s)
FROM table_name